summaryrefslogtreecommitdiff
path: root/graphics/asymptote/LspCpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/LspCpp')
-rw-r--r--graphics/asymptote/LspCpp/CMakeLists.txt3
-rw-r--r--graphics/asymptote/LspCpp/README.md2
-rw-r--r--graphics/asymptote/LspCpp/examples/StdIOClientExample.cpp326
-rw-r--r--graphics/asymptote/LspCpp/examples/StdIOServerExample.cpp218
-rw-r--r--graphics/asymptote/LspCpp/examples/TcpServerExample.cpp306
-rw-r--r--graphics/asymptote/LspCpp/examples/WebsocketExample.cpp22
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h12
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Condition.h76
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Endpoint.h52
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h308
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h88
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h10
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h82
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RemoteEndPoint.h607
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h82
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/StreamMessageProducer.h62
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/TcpServer.h2
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/future.h178
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/json.h12
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h80
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h86
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/macro_map.h2
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/message.h42
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/serializer.h260
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/stream.h380
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/threaded_queue.h58
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/AbsolutePath.h24
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/ClientPreferences.h584
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/CodeActionParams.h164
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/Directory.h8
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/ExecuteCommandParams.h24
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/IProgressMonitor.h212
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/Markup.h4
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/string_ref.h2024
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/ParentProcessWatcher.h8
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/ProcessIoService.h60
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/ProtocolJsonHandler.h10
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/ResourceOperation.h164
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/SimpleTimer.h2
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/client/registerCapability.h34
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/client/unregisterCapability.h28
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/OverridableMethod.h36
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h4
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/addOverridableMethods.h6
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/buildWorkspace.h4
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h14
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h12
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h32
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkToStringStatus.h20
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/codeActionResult.h18
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/executeCommand.h20
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/findLinks.h10
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateAccessors.h6
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateConstructors.h8
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h12
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h18
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateToString.h10
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h82
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h78
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h20
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/searchSymbols.h8
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/sonarlint/protocol.h150
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/general/InitializeParams.h22
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialize.h4
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsClientCapabilities.h24
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsServerCapabilities.h804
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h576
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h238
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/general/progress.h6
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/language/language.h170
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/location_type.h68
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsAny.h252
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCodeAction.h66
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCommand.h38
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsDocumentUri.h32
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsFormattingOptions.h58
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsMarkedString.h24
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h52
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsRange.h30
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsResponseError.h210
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h26
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h10
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h22
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentPositionParams.h20
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextEdit.h60
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h12
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h54
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_code_action.h22
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_completion.h60
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h60
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/out_list.h4
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/symbol.h174
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h384
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/callHierarchy.h124
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_action.h34
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_lens.h20
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/colorPresentation.h64
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/completion.h10
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/didRenameFiles.h32
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_change.h50
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_close.h10
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_open.h6
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_save.h2
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/documentColor.h68
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_link.h6
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h14
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/foldingRange.h70
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/formatting.h16
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/highlight.h2
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/hover.h38
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/linkedEditingRange.h42
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/onTypeFormatting.h16
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h22
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/publishDiagnostics.h8
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/range_formatting.h8
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/references.h12
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/rename.h8
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h26
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/selectionRange.h40
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/semanticHighlighting.h76
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/signature_help.h12
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/typeHierarchy.h186
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/type_definition.h2
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/willSave.h56
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/utils.h2
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/windows/MessageNotify.h44
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/working_files.h4
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/applyEdit.h28
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/configuration.h24
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h36
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/did_change_configuration.h10
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h22
-rw-r--r--graphics/asymptote/LspCpp/include/optional.hpp1846
-rw-r--r--graphics/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp58
-rw-r--r--graphics/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp68
-rw-r--r--graphics/asymptote/LspCpp/src/jsonrpc/RemoteEndPoint.cpp915
-rw-r--r--graphics/asymptote/LspCpp/src/jsonrpc/StreamMessageProducer.cpp314
-rw-r--r--graphics/asymptote/LspCpp/src/jsonrpc/TcpServer.cpp166
-rw-r--r--graphics/asymptote/LspCpp/src/jsonrpc/WebSocketServer.cpp98
-rw-r--r--graphics/asymptote/LspCpp/src/jsonrpc/message.cpp124
-rw-r--r--graphics/asymptote/LspCpp/src/jsonrpc/optional.hpp1846
-rw-r--r--graphics/asymptote/LspCpp/src/jsonrpc/serializer.cpp90
-rw-r--r--graphics/asymptote/LspCpp/src/lsp/Markup.cpp34
-rw-r--r--graphics/asymptote/LspCpp/src/lsp/ParentProcessWatcher.cpp130
-rw-r--r--graphics/asymptote/LspCpp/src/lsp/ProtocolJsonHandler.cpp1228
-rw-r--r--graphics/asymptote/LspCpp/src/lsp/initialize.cpp66
-rw-r--r--graphics/asymptote/LspCpp/src/lsp/lsp.cpp1350
-rw-r--r--graphics/asymptote/LspCpp/src/lsp/lsp_diagnostic.cpp112
-rw-r--r--graphics/asymptote/LspCpp/src/lsp/textDocument.cpp518
-rw-r--r--graphics/asymptote/LspCpp/src/lsp/utils.cpp466
-rw-r--r--graphics/asymptote/LspCpp/src/lsp/working_files.cpp4
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.cpp6
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.h2
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archivertest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/capitalize/capitalize.cpp2
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/condense/condense.cpp2
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkey/filterkey.cpp14
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkeydom/filterkeydom.cpp14
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/jsonx/jsonx.cpp16
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/lookaheadparser/lookaheadparser.cpp44
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/parsebyparts/parsebyparts.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/schemavalidator/schemavalidator.cpp2
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/serialize/serialize.cpp4
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/simplepullreader/simplepullreader.cpp2
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/simplereader/simplereader.cpp4
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/simplewriter/simplewriter.cpp4
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/traverseaspointer.cpp2
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/example/tutorial/tutorial.cpp6
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h20
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/document.h78
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h24
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h24
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/en.h14
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filereadstream.h12
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filewritestream.h12
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/fwd.h12
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h18
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h12
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/regex.h30
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h12
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h14
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/istreamwrapper.h16
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorybuffer.h10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/inttypes.h22
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/stdint.h22
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/ostreamwrapper.h10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/pointer.h42
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h16
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h20
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/schema.h42
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/writer.h28
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/misctest.cpp12
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.h8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/platformtest.cpp12
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/rapidjsontest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp14
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp12
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/namespacetest.cpp10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp16
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/prettywritertest.cpp26
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp26
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp8
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h10
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp48
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp20
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/CHANGE_LOG88
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/COPYING5
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/Jamfile.v213
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/Jamrules1
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/LICENSE_1_0.txt23
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/Makefile32
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/README10
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/TODO36
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool.hpp28
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/future.hpp215
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/locking_ptr.hpp85
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/pool_core.hpp453
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/scope_guard.hpp65
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/worker_thread.hpp115
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/future.hpp144
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/pool.hpp232
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/pool_adaptors.hpp70
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/scheduling_policies.hpp262
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/shutdown_policies.hpp83
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/size_policies.hpp99
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/task_adaptors.hpp168
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/Makefile36
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design.dox145
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design.txt35
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design_header.htm38
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples.dox145
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples.txt14
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples_header.htm38
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer/common_footer.htm17
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer/overview_footer.htm17
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer_sf/common_footer.htm30
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer_sf/overview_footer.htm29
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/index.html9
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview.dox145
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview.txt205
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview_header.htm36
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/reference.dox220
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/reference_header.htm40
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/threadpool.css331
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial.dox145
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial.txt207
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial_header.htm40
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/example/mergesort/Jamfile.v211
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/example/mergesort/mergesort.cpp200
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/Jamfile.v211
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/README7
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/quickstart.cpp50
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/test/compile_all/Jamfile.v211
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/test/compile_all/compile_all.cpp149
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/tutorial/Jamfile.v211
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/tutorial/tutorial.cpp263
-rw-r--r--graphics/asymptote/LspCpp/third_party/threadpool/project-root.jam2
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/CMakeDirectoryInformation.cmake4
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/build.make12
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/Doxyfile8
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/Makefile24
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/cmake_install.cmake6
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/CMakeDirectoryInformation.cmake4
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/DependInfo.cmake16
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/build.make78
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.internal158
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/flags.make2
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/src/Makefile72
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/src/cmake_install.cmake4
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/test/optional_test.cpp6
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/test/uri_builder_test.cpp6
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/test/uri_encoding_test.cpp40
-rw-r--r--graphics/asymptote/LspCpp/third_party/uri/test/uri_test.cpp2
-rw-r--r--graphics/asymptote/LspCpp/third_party/utfcpp/samples/docsample.cpp6
-rw-r--r--graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/core.h16
-rw-r--r--graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp11.h2
-rw-r--r--graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp17.h2
-rw-r--r--graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h18
-rw-r--r--graphics/asymptote/LspCpp/third_party/utfcpp/tests/negative.cpp2
303 files changed, 9826 insertions, 18155 deletions
diff --git a/graphics/asymptote/LspCpp/CMakeLists.txt b/graphics/asymptote/LspCpp/CMakeLists.txt
index ed420b2955..fe35bfcb8c 100644
--- a/graphics/asymptote/LspCpp/CMakeLists.txt
+++ b/graphics/asymptote/LspCpp/CMakeLists.txt
@@ -197,7 +197,7 @@ if(USE_SYSTEM_RAPIDJSON)
endif()
endif()
if(NOT RapidJSON_FOUND)
- if(EXISTS "${CMAKE_SOURCE_DIR}/third_party/rapidjson/include")
+ if(EXISTS "${PROJECT_SOURCE_DIR}/third_party/rapidjson/include")
message(STATUS "Using local RapidJSON")
set(RapidJSON_INCLUDE_DIRS third_party/rapidjson/include)
else()
@@ -227,7 +227,6 @@ target_include_directories(lspcpp
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
)
diff --git a/graphics/asymptote/LspCpp/README.md b/graphics/asymptote/LspCpp/README.md
index 465efe50ba..afdd8814cf 100644
--- a/graphics/asymptote/LspCpp/README.md
+++ b/graphics/asymptote/LspCpp/README.md
@@ -1,7 +1,7 @@
# LspCpp
## Dependencies
-`LspCpp` depends on boost, rapidjson, utfcpp, uri, and threadpool.
+`LspCpp` depends on boost, rapidjson, utfcpp, uri.
## Build
diff --git a/graphics/asymptote/LspCpp/examples/StdIOClientExample.cpp b/graphics/asymptote/LspCpp/examples/StdIOClientExample.cpp
index 2ce67d1862..1c75974912 100644
--- a/graphics/asymptote/LspCpp/examples/StdIOClientExample.cpp
+++ b/graphics/asymptote/LspCpp/examples/StdIOClientExample.cpp
@@ -29,190 +29,190 @@ 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;
- };
+ 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<boost::process::ipstream>(_t)
- {
- }
-
- std::string what() override
- {
- return {};
- }
- void clear() override
- {
-
- }
+ explicit boost_process_ipstream(boost::process::ipstream& _t)
+ : base_istream<boost::process::ipstream>(_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<boost::process::opstream>(_t)
- {
- }
-
- std::string what() override
- {
- return {};
- }
- void clear() override
- {
-
- }
+ explicit boost_process_opstream(boost::process::opstream& _t)
+ : lsp::base_ostream<boost::process::opstream>(_t)
+ {
+ }
+
+ std::string what() override
+ {
+ return {};
+ }
+ void clear() override
+ {
+
+ }
};
class Client
{
public:
- Client(std::string& execPath,const std::vector<std::string>& args)
- :point(protocol_json_handler, endpoint, _log)
- {
- std::error_code ec;
- namespace bp = boost::process;
- c = std::make_shared<bp::child>(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();
+ Client(std::string& execPath,const std::vector<std::string>& args)
+ :point(protocol_json_handler, endpoint, _log)
+ {
+ std::error_code ec;
+ namespace bp = boost::process;
+ c = std::make_shared<bp::child>(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;
+ lsp::ProcessIoService asio_io;
+ std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared< lsp::ProtocolJsonHandler>();
+ DummyLog _log;
- std::shared_ptr<GenericEndpoint> endpoint = std::make_shared<GenericEndpoint>(_log);
+ std::shared_ptr<GenericEndpoint> endpoint = std::make_shared<GenericEndpoint>(_log);
- boost::process::opstream write_to_service;
- boost::process::ipstream read_from_service;
+ boost::process::opstream write_to_service;
+ boost::process::ipstream read_from_service;
- std::shared_ptr<lsp::ostream> write_to_service_proxy = std::make_shared<boost_process_opstream>(write_to_service);
- std::shared_ptr<lsp::istream> read_from_service_proxy = std::make_shared< boost_process_ipstream >(read_from_service);
+ std::shared_ptr<lsp::ostream> write_to_service_proxy = std::make_shared<boost_process_opstream>(write_to_service);
+ std::shared_ptr<lsp::istream> read_from_service_proxy = std::make_shared< boost_process_ipstream >(read_from_service);
- std::shared_ptr<boost::process::child> c;
- RemoteEndPoint point;
+ std::shared_ptr<boost::process::child> 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<string>(), "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<string>();
- }
- 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;
+ using namespace boost::program_options;
+ options_description desc("Allowed options");
+ desc.add_options()
+ ("help,h", "produce help message")
+ ("execPath", value<string>(), "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<string>();
+ }
+ 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 (lsp::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
index 1fccf2a859..028283ab8d 100644
--- a/graphics/asymptote/LspCpp/examples/StdIOServerExample.cpp
+++ b/graphics/asymptote/LspCpp/examples/StdIOServerExample.cpp
@@ -26,100 +26,100 @@ 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;
- };
+ 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<bool>(true));
- });
- remote_end_point_.registerHandler([&](const td_definition::request& req,
- const CancelMonitor& monitor)
- {
- td_definition::response rsp;
- rsp.result.first = std::vector<lsLocation>();
- 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<std::ostream>
- {
- explicit ostream(std::ostream& _t)
- : base_ostream<std::ostream>(_t)
- {
-
- }
-
- std::string what() override
- {
- return {};
- }
- };
- struct istream :lsp::base_istream<std::istream>
- {
- explicit istream(std::istream& _t)
- : base_istream<std::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<ostream> output = std::make_shared<ostream>(std::cout);
- std::shared_ptr<istream> input = std::make_shared<istream>(std::cin);
-
- std::shared_ptr < GenericEndpoint > endpoint = std::make_shared<GenericEndpoint>(_log);
- RemoteEndPoint remote_end_point_;
- Condition<bool> esc_event;
+
+ 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<bool>(true));
+ });
+ remote_end_point_.registerHandler([&](const td_definition::request& req,
+ const CancelMonitor& monitor)
+ {
+ td_definition::response rsp;
+ rsp.result.first = std::vector<lsLocation>();
+ 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<std::ostream>
+ {
+ explicit ostream(std::ostream& _t)
+ : base_ostream<std::ostream>(_t)
+ {
+
+ }
+
+ std::string what() override
+ {
+ return {};
+ }
+ };
+ struct istream :lsp::base_istream<std::istream>
+ {
+ explicit istream(std::istream& _t)
+ : base_istream<std::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<ostream> output = std::make_shared<ostream>(std::cout);
+ std::shared_ptr<istream> input = std::make_shared<istream>(std::cin);
+
+ std::shared_ptr < GenericEndpoint > endpoint = std::make_shared<GenericEndpoint>(_log);
+ RemoteEndPoint remote_end_point_;
+ Condition<bool> esc_event;
};
@@ -127,33 +127,33 @@ public:
int main(int argc, char* argv[])
{
- using namespace boost::program_options;
- options_description desc("Allowed options");
- desc.add_options()
- ("help,h", "produce help message");
+ 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);
+ 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();
+ if (vm.count("help"))
+ {
+ cout << desc << endl;
+ return 1;
+ }
+ StdIOServer server;
+ server.esc_event.wait();
- return 0;
+ return 0;
}
diff --git a/graphics/asymptote/LspCpp/examples/TcpServerExample.cpp b/graphics/asymptote/LspCpp/examples/TcpServerExample.cpp
index 80f77b5eb9..42ed73407e 100644
--- a/graphics/asymptote/LspCpp/examples/TcpServerExample.cpp
+++ b/graphics/asymptote/LspCpp/examples/TcpServerExample.cpp
@@ -25,22 +25,22 @@ 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;
- };
+ 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";
@@ -51,149 +51,157 @@ 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<lsLocation>();
- 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<GenericEndpoint>(_log);
- lsp::TcpServer server;
+ 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) -> lsp::ResponseOrError<td_definition::response>
+ {
+
+ std::this_thread::sleep_for(std::chrono::seconds(8));
+
+ if( monitor && monitor() )
+ {
+ _log.info("textDocument/definition request had been cancel.");
+ Rsp_Error rsp;
+ rsp.error.code = lsErrorCodes::RequestCancelled;
+ rsp.error.message = "textDocument/definition request had been cancel.";
+ return rsp;
+ }
+ else
+ {
+ td_definition::response rsp;
+ rsp.result.first= std::vector<lsLocation>();
+ 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<GenericEndpoint>(_log);
+ lsp::TcpServer server;
};
class Client
{
public:
- struct iostream :public lsp::base_iostream<tcp::iostream>
- {
- explicit iostream(boost::asio::basic_socket_iostream<tcp>& _t)
- : base_iostream<boost::asio::basic_socket_iostream<tcp>>(_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<tcp::iostream>();
- socket_->connect(end_point);
- if (!socket_)
- {
- string temp = "Unable to connect: " + socket_->error().message();
- std::cout << temp << std::endl;
- }
-
- vector<string> args;
- socket_proxy = std::make_shared<iostream>(*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<GenericEndpoint> endpoint = std::make_shared<GenericEndpoint>(_log);
-
- std::shared_ptr < iostream> socket_proxy;
- std::shared_ptr<tcp::iostream> socket_;
- RemoteEndPoint remote_end_point_;
+ struct iostream :public lsp::base_iostream<tcp::iostream>
+ {
+ explicit iostream(boost::asio::basic_socket_iostream<tcp>& _t)
+ : base_iostream<boost::asio::basic_socket_iostream<tcp>>(_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<tcp::iostream>();
+ socket_->connect(end_point);
+ if (!socket_)
+ {
+ string temp = "Unable to connect: " + socket_->error().message();
+ std::cout << temp << std::endl;
+ }
+
+ vector<string> args;
+ socket_proxy = std::make_shared<iostream>(*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<GenericEndpoint> endpoint = std::make_shared<GenericEndpoint>(_log);
+
+ std::shared_ptr < iostream> socket_proxy;
+ std::shared_ptr<tcp::iostream> socket_;
+ RemoteEndPoint remote_end_point_;
};
-int main()
+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;
+ 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);
+ client.remote_end_point_.cancelRequest(req.id);
+
+ auto state = future_rsp.wait_for(std::chrono::seconds(16));
+ if (lsp::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 :" << rsp.ToJson() << 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
index 40d920ac00..b0474bc288 100644
--- a/graphics/asymptote/LspCpp/examples/WebsocketExample.cpp
+++ b/graphics/asymptote/LspCpp/examples/WebsocketExample.cpp
@@ -89,9 +89,9 @@ class Client : public std::enable_shared_from_this<Client>
std::string user_agent_;
std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared< lsp::ProtocolJsonHandler>();
DummyLog _log;
-
+
std::shared_ptr<GenericEndpoint> endpoint = std::make_shared<GenericEndpoint>(_log);
-
+
std::shared_ptr<lsp::websocket_stream_wrapper> proxy_;
public:
RemoteEndPoint point;
@@ -104,7 +104,7 @@ public:
, ws_(net::make_strand(ioc)),point(protocol_json_handler, endpoint, _log)
{
proxy_ = std::make_shared<lsp::websocket_stream_wrapper>(ws_);
-
+
}
// Start the asynchronous operation
@@ -127,12 +127,12 @@ public:
{
ioc.run();
}).detach();
- while (!point.IsWorking())
+ while (!point.isWorking())
{
std::this_thread::sleep_for(std::chrono::milliseconds (50));
}
}
-
+
void
on_resolve(
beast::error_code ec,
@@ -189,7 +189,7 @@ public:
return;
// Send the message
-
+
point.startProcessingMessages(proxy_, proxy_);
// Read a message into our buffer
@@ -215,7 +215,7 @@ public:
std::vector<char> elements(data, data + bytes_transferred);
buffer_.clear();
proxy_->on_request.EnqueueAll(std::move(elements), false);
-
+
ws_.async_read(
buffer_,
beast::bind_front_handler(
@@ -249,7 +249,7 @@ public:
code_lens_options.resolveProvider = true;
rsp.result.capabilities.codeLensProvider = code_lens_options;
return rsp;
- });
+ });
std::thread([&]()
{
server.run();
@@ -261,7 +261,7 @@ public:
}
std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared < lsp::ProtocolJsonHandler >();
DummyLog _log;
-
+
std::shared_ptr < GenericEndpoint > endpoint = std::make_shared<GenericEndpoint>(_log);
lsp::WebSocketServer server;
@@ -271,11 +271,11 @@ int main()
{
std::string user_agent = std::string(BOOST_BEAST_VERSION_STRING) +" websocket-server-async";
Server server(user_agent);
-
+
auto client = std::make_shared<Client>();
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);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h
index b89f32f166..496be29844 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h
@@ -7,12 +7,12 @@ namespace Cancellation
{
struct Params {
- /**
- * The request id to cancel.
- */
- lsRequestId id;
-
- MAKE_SWAP_METHOD(Cancellation::Params, id);
+ /**
+ * The request id to cancel.
+ */
+ lsRequestId id;
+
+ MAKE_SWAP_METHOD(Cancellation::Params, id);
};
};
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Condition.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Condition.h
index a5f550041d..6a8cf7a2a6 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Condition.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Condition.h
@@ -5,44 +5,44 @@ class Condition
{
public:
- std::mutex m_mutex;
- std::condition_variable m_condition;
- ~Condition() {
- m_condition.notify_all();
- }
- void notify(std::unique_ptr<T> data) noexcept
- {
- {
- std::lock_guard<std::mutex> eventLock(m_mutex);
- any.swap(data);
- }
- // wake up one waiter
- m_condition.notify_one();
- };
+ std::mutex m_mutex;
+ std::condition_variable m_condition;
+ ~Condition() {
+ m_condition.notify_all();
+ }
+ void notify(std::unique_ptr<T> data) noexcept
+ {
+ {
+ std::lock_guard<std::mutex> eventLock(m_mutex);
+ any.swap(data);
+ }
+ // wake up one waiter
+ m_condition.notify_one();
+ };
-
- std::unique_ptr<T> wait(unsigned timeout=0)
- {
- std::unique_lock<std::mutex> 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<T>(any.release());
-
- }
+
+ std::unique_ptr<T> wait(unsigned timeout=0)
+ {
+ std::unique_lock<std::mutex> 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<T>(any.release());
+
+ }
private:
- std::unique_ptr<T> any;
+ std::unique_ptr<T> any;
};
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Endpoint.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Endpoint.h
index 01d8e8ca91..d752711a3a 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Endpoint.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Endpoint.h
@@ -15,38 +15,38 @@ using GenericNotificationHandler = std::function< bool(std::unique_ptr<LspMessag
class Endpoint
{
public:
- virtual ~Endpoint() = default;
- virtual bool onRequest(std::unique_ptr<LspMessage>) = 0;
- virtual bool notify(std::unique_ptr<LspMessage>) = 0;
-
- virtual bool onResponse(const std::string&, std::unique_ptr<LspMessage>) = 0;
- virtual void registerRequestHandler(const std::string&, GenericResponseHandler ) = 0;
- virtual void registerNotifyHandler(const std::string&, GenericNotificationHandler ) = 0;
+ virtual ~Endpoint() = default;
+ virtual bool onRequest(std::unique_ptr<LspMessage>) = 0;
+ virtual bool notify(std::unique_ptr<LspMessage>) = 0;
+
+ virtual bool onResponse(const std::string&, std::unique_ptr<LspMessage>) = 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<LspMessage>) override;
- bool onResponse(const std::string&, std::unique_ptr<LspMessage>) override;
-
- bool onRequest(std::unique_ptr<LspMessage>) 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;
+ GenericEndpoint(lsp::Log& l):log(l){}
+ bool notify(std::unique_ptr<LspMessage>) override;
+ bool onResponse(const std::string&, std::unique_ptr<LspMessage>) override;
+
+ bool onRequest(std::unique_ptr<LspMessage>) 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/MessageIssue.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h
index bda6e65d46..6c29ee8f0e 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h
@@ -4,179 +4,179 @@
#include <vector>
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.
- * <p>
- * 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.
- * <p>
- * 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.
- * <p>
- * 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.
- * <p>
- * 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 <CODE>4</CODE>.
- */
-
- CONFIG = 4,
-
-
-
- /**
- * FINE is a message level providing tracing information.
- * <p>
- * 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.
- * <p>
- * 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.
- * <p>
- * 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 <CODE>5</CODE>.
- */
- 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 <CODE>400</CODE>.
- */
- FINER = 6,
-
- /**
- * FINEST indicates a highly detailed tracing message.
- * This level is initialized to <CODE>300</CODE>.
- */
- FINEST = 7,
-
- /**
- * ALL indicates that all messages should be logged.
- * This level is initialized to <CODE>Integer.MIN_VALUE</CODE>.
- */
- 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 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.
+ * <p>
+ * 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.
+ * <p>
+ * 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.
+ * <p>
+ * 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.
+ * <p>
+ * 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 <CODE>4</CODE>.
+ */
+
+ CONFIG = 4,
+
+
+
+ /**
+ * FINE is a message level providing tracing information.
+ * <p>
+ * 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.
+ * <p>
+ * 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.
+ * <p>
+ * 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 <CODE>5</CODE>.
+ */
+ 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 <CODE>400</CODE>.
+ */
+ FINER = 6,
+
+ /**
+ * FINEST indicates a highly detailed tracing message.
+ * This level is initialized to <CODE>300</CODE>.
+ */
+ FINEST = 7,
+
+ /**
+ * ALL indicates that all messages should be logged.
+ * This level is initialized to <CODE>Integer.MIN_VALUE</CODE>.
+ */
+ 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;
+ std::string text;
- lsp::Log::Level code;
+ lsp::Log::Level code;
- MessageIssue(const std::string& text, lsp::Log::Level code) :text(text), code(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)
- {
+ }
+ MessageIssue(std::string&& text, lsp::Log::Level code) :text(text), code(code)
+ {
- }
+ }
- std::string getText() {
- return text;
- }
+ std::string getText() {
+ return text;
+ }
- lsp::Log::Level getIssueCode() {
- return code;
- }
+ lsp::Log::Level getIssueCode() {
+ return code;
+ }
- std::string toString() {
- return getText();
- }
+ 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<MessageIssue>&&) = 0;
- virtual void handle( MessageIssue&&) = 0;
+ /**
+ * 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<MessageIssue>&&) = 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
index 7e238b0cf6..f019fbf121 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h
@@ -13,49 +13,49 @@ using GenericNotificationJsonHandler = std::function< std::unique_ptr<LspMessag
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<LspMessage> parseResponseMessage(const std::string&, Reader&);
- std::unique_ptr<LspMessage> parseRequstMessage(const std::string&, Reader&);
- bool resovleResponseMessage(Reader&, std::pair<std::string, std::unique_ptr<LspMessage>>& result);
- std::unique_ptr<LspMessage> parseNotificationMessage(const std::string&, Reader&);
+ 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<LspMessage> parseResponseMessage(const std::string&, Reader&);
+ std::unique_ptr<LspMessage> parseRequstMessage(const std::string&, Reader&);
+ bool resovleResponseMessage(Reader&, std::pair<std::string, std::unique_ptr<LspMessage>>& result);
+ std::unique_ptr<LspMessage> 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
index ab7a29a17f..2affe3b3ff 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h
@@ -5,9 +5,9 @@
class MessageProducer
{
public:
-
-
- typedef std::function< void(std::string&&) > MessageConsumer;
- virtual ~MessageProducer() = default;
- virtual void listen(MessageConsumer) = 0;
+
+
+ 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
index e4841b5703..cdee9e572e 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h
@@ -9,54 +9,54 @@
// 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;
+ 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 <class T, class TDerived >
struct lsNotificationInMessage : NotificationInMessage {
- void ReflectWriter(Writer& writer) override {
- Reflect(writer, static_cast<TDerived&>(*this));
- }
- lsNotificationInMessage(MethodType _method)
- {
- method = _method;
- }
-
- static std::unique_ptr<LspMessage> ReflectReader(Reader& visitor) {
-
- TDerived* temp = new TDerived();
-
- std::unique_ptr<TDerived> message = std::unique_ptr<TDerived>(temp);
- // Reflect may throw and *message will be partially deserialized.
- Reflect(visitor, static_cast<TDerived&>(*temp));
- return message;
-
- }
- void swap(lsNotificationInMessage& arg) noexcept
- {
- method.swap(method);
- std::swap(params, arg.params);
- }
- T params;
+ void ReflectWriter(Writer& writer) override {
+ Reflect(writer, static_cast<TDerived&>(*this));
+ }
+ lsNotificationInMessage(MethodType _method)
+ {
+ method = _method;
+ }
+
+ static std::unique_ptr<LspMessage> ReflectReader(Reader& visitor) {
+
+ TDerived* temp = new TDerived();
+
+ std::unique_ptr<TDerived> message = std::unique_ptr<TDerived>(temp);
+ // Reflect may throw and *message will be partially deserialized.
+ Reflect(visitor, static_cast<TDerived&>(*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){} \
- };\
+ 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
index 3ae6b567a5..4045098f1b 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RemoteEndPoint.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RemoteEndPoint.h
@@ -12,6 +12,7 @@
#include "MessageIssue.h"
#include "LibLsp/JsonRpc/MessageJsonHandler.h"
#include "Endpoint.h"
+#include "future.h"
class MessageJsonHandler;
@@ -19,74 +20,74 @@ class Endpoint;
struct LspMessage;
class RemoteEndPoint;
namespace lsp {
- class ostream;
- class istream;
-
- ////////////////////////////////////////////////////////////////////////////////
- // ResponseOrError<T>
- ////////////////////////////////////////////////////////////////////////////////
-
- // ResponseOrError holds either the response to a request or an error
- // message.
- template <typename T>
- 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 <typename T>
- ResponseOrError<T>::ResponseOrError(): is_error(false)
- {
- }
-
- template <typename T>
- ResponseOrError<T>::ResponseOrError(const T& resp) : response(resp), is_error(false) {}
- template <typename T>
- ResponseOrError<T>::ResponseOrError(T&& resp) : response(std::move(resp)), is_error(false) {}
- template <typename T>
- ResponseOrError<T>::ResponseOrError(const Rsp_Error& err) : error(err), is_error(true) {}
- template <typename T>
- ResponseOrError<T>::ResponseOrError(Rsp_Error&& err) : error(std::move(err)), is_error(true) {}
- template <typename T>
- ResponseOrError<T>::ResponseOrError(const ResponseOrError& other)
- : response(other.response), error(other.error), is_error(other.is_error) {}
- template <typename T>
- ResponseOrError<T>::ResponseOrError(ResponseOrError&& other) noexcept
- : response(std::move(other.response)), error(std::move(other.error)), is_error(other.is_error) {}
- template <typename T>
- ResponseOrError<T>& ResponseOrError<T>::operator=(
- const ResponseOrError& other) {
- response = other.response;
- error = other.error;
- is_error = other.is_error;
- return *this;
- }
- template <typename T>
- ResponseOrError<T>& ResponseOrError<T>::operator=(ResponseOrError&& other) noexcept
- {
- response = std::move(other.response);
- error = std::move(other.error);
- is_error = other.is_error;
- return *this;
- }
+ class ostream;
+ class istream;
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // ResponseOrError<T>
+ ////////////////////////////////////////////////////////////////////////////////
+
+ // ResponseOrError holds either the response to a request or an error
+ // message.
+ template <typename T>
+ 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 <typename T>
+ ResponseOrError<T>::ResponseOrError(): is_error(false)
+ {
+ }
+
+ template <typename T>
+ ResponseOrError<T>::ResponseOrError(const T& resp) : response(resp), is_error(false) {}
+ template <typename T>
+ ResponseOrError<T>::ResponseOrError(T&& resp) : response(std::move(resp)), is_error(false) {}
+ template <typename T>
+ ResponseOrError<T>::ResponseOrError(const Rsp_Error& err) : error(err), is_error(true) {}
+ template <typename T>
+ ResponseOrError<T>::ResponseOrError(Rsp_Error&& err) : error(std::move(err)), is_error(true) {}
+ template <typename T>
+ ResponseOrError<T>::ResponseOrError(const ResponseOrError& other)
+ : response(other.response), error(other.error), is_error(other.is_error) {}
+ template <typename T>
+ ResponseOrError<T>::ResponseOrError(ResponseOrError&& other) noexcept
+ : response(std::move(other.response)), error(std::move(other.error)), is_error(other.is_error) {}
+ template <typename T>
+ ResponseOrError<T>& ResponseOrError<T>::operator=(
+ const ResponseOrError& other) {
+ response = other.response;
+ error = other.error;
+ is_error = other.is_error;
+ return *this;
+ }
+ template <typename T>
+ ResponseOrError<T>& ResponseOrError<T>::operator=(ResponseOrError&& other) noexcept
+ {
+ response = std::move(other.response);
+ error = std::move(other.error);
+ is_error = other.is_error;
+ return *this;
+ }
}
@@ -94,247 +95,253 @@ namespace lsp {
class RemoteEndPoint :MessageIssueHandler
{
- template <typename F, int N>
- using ParamType = lsp::traits::ParameterType<F, N>;
+ template <typename F, int N>
+ using ParamType = lsp::traits::ParameterType<F, N>;
- template <typename T>
- using IsRequest = lsp::traits::EnableIfIsType<RequestInMessage, T>;
+ template <typename T>
+ using IsRequest = lsp::traits::EnableIfIsType<RequestInMessage, T>;
- template <typename T>
- using IsResponse = lsp::traits::EnableIfIsType<ResponseInMessage, T>;
+ template <typename T>
+ using IsResponse = lsp::traits::EnableIfIsType<ResponseInMessage, T>;
- template <typename T>
- using IsNotify = lsp::traits::EnableIfIsType<NotificationInMessage, T>;
+ template <typename T>
+ using IsNotify = lsp::traits::EnableIfIsType<NotificationInMessage, T>;
- template <typename F, typename ReturnType>
- using IsRequestHandler = lsp::traits::EnableIf<lsp::traits::CompatibleWith<
- F,
- std::function<ReturnType(const RequestInMessage&)>>::
- value>;
+ template <typename F, typename ReturnType>
+ using IsRequestHandler = lsp::traits::EnableIf<lsp::traits::CompatibleWith<
+ F,
+ std::function<ReturnType(const RequestInMessage&)>>::
+ value>;
- template <typename F, typename ReturnType>
- using IsRequestHandlerWithMonitor = lsp::traits::EnableIf<lsp::traits::CompatibleWith<
- F,
- std::function<ReturnType(const RequestInMessage&,const CancelMonitor&)>>::
- value>;
+ template <typename F, typename ReturnType>
+ using IsRequestHandlerWithMonitor = lsp::traits::EnableIf<lsp::traits::CompatibleWith<
+ F,
+ std::function<ReturnType(const RequestInMessage&,const CancelMonitor&)>>::
+ value>;
public:
-
- RemoteEndPoint(const std::shared_ptr <MessageJsonHandler>& json_handler,
- const std::shared_ptr < Endpoint >& localEndPoint,
- lsp::Log& _log, uint8_t max_workers = 2);
-
- ~RemoteEndPoint() override;
- template <typename F, typename RequestType = ParamType<F, 0>, typename ResponseType = typename RequestType::Response>
- IsRequestHandler< F, lsp::ResponseOrError<ResponseType> > registerHandler(F&& handler)
- {
- ProcessRequestJsonHandler(handler);
- local_endpoint->registerRequestHandler(RequestType::kMethodInfo, [=](std::unique_ptr<LspMessage> msg) {
- auto req = reinterpret_cast<const RequestType*>(msg.get());
- lsp::ResponseOrError<ResponseType> 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 F, typename RequestType = ParamType<F, 0>, typename ResponseType = typename RequestType::Response>
- IsRequestHandlerWithMonitor< F, lsp::ResponseOrError<ResponseType> > registerHandler(F&& handler) {
- ProcessRequestJsonHandler(handler);
- local_endpoint->registerRequestHandler(RequestType::kMethodInfo, [=](std::unique_ptr<LspMessage> msg) {
- auto req = static_cast<const RequestType*>(msg.get());
- lsp::ResponseOrError<ResponseType> 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<void(const Rsp_Error&)>;
-
- template <typename T, typename F, typename ResponseType = ParamType<F, 0> >
- void send(T& request, F&& handler, RequestErrorCallback onError)
- {
- ProcessRequestJsonHandler(handler);
- auto cb = [=](std::unique_ptr<LspMessage> msg) {
- if (!msg)
- return true;
- const auto result = msg.get();
-
- if (static_cast<ResponseInMessage*>(result)->IsErrorType()) {
- const auto rsp_error = static_cast<const Rsp_Error*>(result);
- onError(*rsp_error);
- }
- else {
- handler(*static_cast<ResponseType*>(result));
- }
-
- return true;
- };
- internalSendRequest(request, cb);
- }
-
-
- template <typename F, typename NotifyType = ParamType<F, 0> >
- IsNotify<NotifyType> registerHandler(F&& handler) {
- {
- std::lock_guard<std::mutex> 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<LspMessage> msg) {
- handler(*static_cast<NotifyType*>(msg.get()));
- return true;
- });
- }
-
- template <typename T, typename = IsRequest<T>>
- std::future< lsp::ResponseOrError<typename T::Response> > send(T& request) {
-
- ProcessResponseJsonHandler(request);
- using Response = typename T::Response;
- auto promise = std::make_shared< std::promise<lsp::ResponseOrError<Response>>>();
- auto cb = [=](std::unique_ptr<LspMessage> msg) {
- if (!msg)
- return true;
- auto result = msg.get();
-
- if (reinterpret_cast<ResponseInMessage*>(result)->IsErrorType())
- {
- Rsp_Error* rsp_error = static_cast<Rsp_Error*>(result);
- Rsp_Error temp;
- std::swap(temp, *rsp_error);
- promise->set_value(std::move(lsp::ResponseOrError<Response>(std::move(temp))));
- }
- else
- {
- Response temp;
- std::swap(temp, *static_cast<Response*>(result));
- promise->set_value(std::move(lsp::ResponseOrError<Response>(std::move(temp))));
- }
- return true;
- };
- internalSendRequest(request, cb);
- return promise->get_future();
- }
-
- template <typename T, typename = IsRequest<T>>
- std::unique_ptr<lsp::ResponseOrError<typename T::Response>> 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<lsp::ResponseOrError<Response>>(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<lsp::istream> r,
- std::shared_ptr<lsp::ostream> w);
-
- bool IsWorking() const
- {
- if (message_producer_thread_)
- return true;
- return false;
- }
- void Stop();
-
- std::unique_ptr<LspMessage> internalWaitResponse(RequestInMessage&, unsigned time_out = 0);
-
- void internalSendRequest(RequestInMessage&, GenericResponseHandler);
-
- void handle(std::vector<MessageIssue>&&) override;
- void handle(MessageIssue&&) override;
+
+ RemoteEndPoint(const std::shared_ptr <MessageJsonHandler>& json_handler,
+ const std::shared_ptr < Endpoint >& localEndPoint,
+ lsp::Log& _log, uint8_t max_workers = 2);
+
+ ~RemoteEndPoint() override;
+ template <typename F, typename RequestType = ParamType<F, 0>, typename ResponseType = typename RequestType::Response>
+ IsRequestHandler< F, lsp::ResponseOrError<ResponseType> > registerHandler(F&& handler)
+ {
+ processRequestJsonHandler(handler);
+ local_endpoint->registerRequestHandler(RequestType::kMethodInfo, [=](std::unique_ptr<LspMessage> msg) {
+ auto req = reinterpret_cast<const RequestType*>(msg.get());
+ lsp::ResponseOrError<ResponseType> 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 F, typename RequestType = ParamType<F, 0>, typename ResponseType = typename RequestType::Response>
+ IsRequestHandlerWithMonitor< F, lsp::ResponseOrError<ResponseType> > registerHandler(F&& handler) {
+ processRequestJsonHandler(handler);
+ local_endpoint->registerRequestHandler(RequestType::kMethodInfo, [=](std::unique_ptr<LspMessage> msg) {
+ auto req = static_cast<const RequestType*>(msg.get());
+ lsp::ResponseOrError<ResponseType> 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<void(const Rsp_Error&)>;
+
+ template <typename T, typename F, typename ResponseType = ParamType<F, 0> >
+ void send(T& request, F&& handler, RequestErrorCallback onError)
+ {
+ processRequestJsonHandler(handler);
+ auto cb = [=](std::unique_ptr<LspMessage> msg) {
+ if (!msg)
+ return true;
+ const auto result = msg.get();
+
+ if (static_cast<ResponseInMessage*>(result)->IsErrorType()) {
+ const auto rsp_error = static_cast<const Rsp_Error*>(result);
+ onError(*rsp_error);
+ }
+ else {
+ handler(*static_cast<ResponseType*>(result));
+ }
+
+ return true;
+ };
+ internalSendRequest(request, cb);
+ }
+
+
+ template <typename F, typename NotifyType = ParamType<F, 0> >
+ IsNotify<NotifyType> registerHandler(F&& handler) {
+ {
+ std::lock_guard<std::mutex> 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<LspMessage> msg) {
+ handler(*static_cast<NotifyType*>(msg.get()));
+ return true;
+ });
+ }
+
+ template <typename T, typename = IsRequest<T>>
+ lsp::future< lsp::ResponseOrError<typename T::Response> > send(T& request) {
+
+ processResponseJsonHandler(request);
+ using Response = typename T::Response;
+ auto promise = std::make_shared< lsp::promise<lsp::ResponseOrError<Response>>>();
+ auto cb = [=](std::unique_ptr<LspMessage> msg) {
+ if (!msg)
+ return true;
+ auto result = msg.get();
+
+ if (reinterpret_cast<ResponseInMessage*>(result)->IsErrorType())
+ {
+ Rsp_Error* rsp_error = static_cast<Rsp_Error*>(result);
+ Rsp_Error temp;
+ std::swap(temp, *rsp_error);
+ promise->set_value(std::move(lsp::ResponseOrError<Response>(std::move(temp))));
+ }
+ else
+ {
+ Response temp;
+ std::swap(temp, *static_cast<Response*>(result));
+ promise->set_value(std::move(lsp::ResponseOrError<Response>(std::move(temp))));
+ }
+ return true;
+ };
+ internalSendRequest(request, cb);
+ return promise->get_future();
+ }
+
+ template <typename T, typename = IsRequest<T>>
+ std::unique_ptr<lsp::ResponseOrError<typename T::Response>> 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 (lsp::future_status::timeout == state)
+ {
+ return {};
+ }
+ }
+
+ using Response = typename T::Response;
+ return std::make_unique<lsp::ResponseOrError<Response>>(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);
+ }
+ template <typename T>
+ T createRequest() {
+ auto req = T();
+ req.id.set(getNextRequestId());
+ return req;
+ }
+
+ int getNextRequestId();
+
+ bool cancelRequest(const lsRequestId&);
+
+ void startProcessingMessages(std::shared_ptr<lsp::istream> r,
+ std::shared_ptr<lsp::ostream> w);
+
+ bool isWorking() const;
+ void stop();
+
+ std::unique_ptr<LspMessage> internalWaitResponse(RequestInMessage&, unsigned time_out = 0);
+
+ bool internalSendRequest(RequestInMessage &info, GenericResponseHandler handler);
+
+ void handle(std::vector<MessageIssue>&&) override;
+ void handle(MessageIssue&&) override;
private:
- CancelMonitor getCancelMonitor(const lsRequestId&);
- void sendMsg(LspMessage& msg);
- void mainLoop(std::unique_ptr<LspMessage>);
- bool dispatch(const std::string&);
- template <typename F, typename RequestType = ParamType<F, 0>>
- IsRequest<RequestType> ProcessRequestJsonHandler(const F& handler) {
- std::lock_guard<std::mutex> lock(m_sendMutex);
- if (!jsonHandler->GetRequestJsonHandler(RequestType::kMethodInfo))
- {
- jsonHandler->SetRequestJsonHandler(RequestType::kMethodInfo,
- [](Reader& visitor)
- {
- return RequestType::ReflectReader(visitor);
- });
- }
- }
- template <typename T, typename = IsRequest<T>>
- void ProcessResponseJsonHandler(T& request)
- {
- using Response = typename T::Response;
- std::lock_guard<std::mutex> 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;
+ CancelMonitor getCancelMonitor(const lsRequestId&);
+ void sendMsg(LspMessage& msg);
+ void mainLoop(std::unique_ptr<LspMessage>);
+ bool dispatch(const std::string&);
+ template <typename F, typename RequestType = ParamType<F, 0>>
+ IsRequest<RequestType> processRequestJsonHandler(const F& handler) {
+ std::lock_guard<std::mutex> lock(m_sendMutex);
+ if (!jsonHandler->GetRequestJsonHandler(RequestType::kMethodInfo))
+ {
+ jsonHandler->SetRequestJsonHandler(RequestType::kMethodInfo,
+ [](Reader& visitor)
+ {
+ return RequestType::ReflectReader(visitor);
+ });
+ }
+ }
+ template <typename T, typename = IsRequest<T>>
+ void processResponseJsonHandler(T& request)
+ {
+ using Response = typename T::Response;
+ std::lock_guard<std::mutex> 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_;
+ 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
index 163d038a2e..0775b36dba 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h
@@ -10,14 +10,14 @@
#include "lsResponseMessage.h"
struct RequestInMessage : public LspMessage {
- // number or string, actually no null
- lsRequestId id;
- std::string method;
- Kind GetKid() override
- {
- return REQUEST_MESSAGE;
- }
-
+ // number or string, actually no null
+ lsRequestId id;
+ std::string method;
+ Kind GetKid() override
+ {
+ return REQUEST_MESSAGE;
+ }
+
};
@@ -25,45 +25,45 @@ struct RequestInMessage : public LspMessage {
template <class T, class TDerived >
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<TDerived&>(*this));
- }
-
- static std::unique_ptr<LspMessage> ReflectReader(Reader& visitor) {
+ 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<TDerived&>(*this));
+ }
+
+ static std::unique_ptr<LspMessage> ReflectReader(Reader& visitor) {
- TDerived* temp = new TDerived();
- std::unique_ptr<TDerived> message = std::unique_ptr<TDerived>(temp);
- // Reflect may throw and *message will be partially deserialized.
- Reflect(visitor, static_cast<TDerived&>(*temp));
- return message;
- }
- void swap(lsRequest& arg) noexcept
- {
- id.swap(arg.id);
- method.swap(method);
- std::swap(params, arg.params);
- }
- T params;
+ TDerived* temp = new TDerived();
+ std::unique_ptr<TDerived> message = std::unique_ptr<TDerived>(temp);
+ // Reflect may throw and *message will be partially deserialized.
+ Reflect(visitor, static_cast<TDerived&>(*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;\
- };\
+ 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/StreamMessageProducer.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/StreamMessageProducer.h
index 439a9f1b0e..e039891f5f 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/StreamMessageProducer.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/StreamMessageProducer.h
@@ -7,42 +7,42 @@
#include "MessageIssue.h"
namespace lsp {
- class istream;
+ 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);
+ 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;
-
+ 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
index e533acf056..a377be8c3e 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/TcpServer.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/TcpServer.h
@@ -36,5 +36,5 @@ namespace lsp
void do_stop();
Data* d_ptr = nullptr;
};
-} // namespace
+} // namespace
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/future.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/future.h
new file mode 100644
index 0000000000..8e241d96e9
--- /dev/null
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/future.h
@@ -0,0 +1,178 @@
+// Copyright 2019 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 <condition_variable>
+#include <memory>
+#include <mutex>
+
+namespace lsp {
+
+// internal functionality
+namespace detail {
+template <typename T>
+struct promise_state {
+ T val;
+ std::mutex mutex;
+ std::condition_variable cv;
+ bool hasVal = false;
+};
+} // namespace detail
+
+// forward declaration
+template <typename T>
+class promise;
+
+// future_status is the enumeration returned by future::wait_for and
+// future::wait_until.
+enum class future_status {
+ ready,
+ timeout,
+};
+
+// future is a minimal reimplementation of std::future, that does not suffer
+// from TSAN false positives. See:
+// https://gcc.gnu.org/bugzilla//show_bug.cgi?id=69204
+template <typename T>
+class future {
+ public:
+ using State = detail::promise_state<T>;
+
+ // constructors
+ inline future() = default;
+ inline future(future&&) = default;
+
+ // valid() returns true if the future has an internal state.
+ bool valid() const;
+
+ // get() blocks until the future has a valid result, and returns it.
+ // The future must have a valid internal state to call this method.
+ inline T get();
+
+ // wait() blocks until the future has a valid result.
+ // The future must have a valid internal state to call this method.
+ void wait() const;
+
+ // wait_for() blocks until the future has a valid result, or the timeout is
+ // reached.
+ // The future must have a valid internal state to call this method.
+ template <class Rep, class Period>
+ future_status wait_for(
+ const std::chrono::duration<Rep, Period>& timeout) const;
+
+ // wait_until() blocks until the future has a valid result, or the timeout is
+ // reached.
+ // The future must have a valid internal state to call this method.
+ template <class Clock, class Duration>
+ future_status wait_until(
+ const std::chrono::time_point<Clock, Duration>& timeout) const;
+
+ private:
+ friend promise<T>;
+ future(const future&) = delete;
+ inline future(const std::shared_ptr<State>& state);
+
+ std::shared_ptr<State> state = std::make_shared<State>();
+};
+
+template <typename T>
+future<T>::future(const std::shared_ptr<State>& s) : state(s) {}
+
+template <typename T>
+bool future<T>::valid() const {
+ return static_cast<bool>(state);
+}
+
+template <typename T>
+T future<T>::get() {
+ std::unique_lock<std::mutex> lock(state->mutex);
+ state->cv.wait(lock, [&] { return state->hasVal; });
+ return state->val;
+}
+
+template <typename T>
+void future<T>::wait() const {
+ std::unique_lock<std::mutex> lock(state->mutex);
+ state->cv.wait(lock, [&] { return state->hasVal; });
+}
+
+template <typename T>
+template <class Rep, class Period>
+future_status future<T>::wait_for(
+ const std::chrono::duration<Rep, Period>& timeout) const {
+ std::unique_lock<std::mutex> lock(state->mutex);
+ return state->cv.wait_for(lock, timeout, [&] { return state->hasVal; })
+ ? future_status::ready
+ : future_status::timeout;
+}
+
+template <typename T>
+template <class Clock, class Duration>
+future_status future<T>::wait_until(
+ const std::chrono::time_point<Clock, Duration>& timeout) const {
+ std::unique_lock<std::mutex> lock(state->mutex);
+ return state->cv.wait_until(lock, timeout, [&] { return state->hasVal; })
+ ? future_status::ready
+ : future_status::timeout;
+}
+
+// promise is a minimal reimplementation of std::promise, that does not suffer
+// from TSAN false positives. See:
+// https://gcc.gnu.org/bugzilla//show_bug.cgi?id=69204
+template <typename T>
+class promise {
+ public:
+ // constructors
+ inline promise() = default;
+ inline promise(promise&& other) = default;
+ inline promise(const promise& other) = default;
+
+ // set_value() stores value to the shared state.
+ // set_value() must only be called once.
+ inline void set_value(const T& value) const;
+ inline void set_value(T&& value) const;
+
+ // get_future() returns a future sharing this promise's state.
+ future<T> get_future();
+
+ private:
+ using State = detail::promise_state<T>;
+ std::shared_ptr<State> state = std::make_shared<State>();
+};
+
+template <typename T>
+future<T> promise<T>::get_future() {
+ return future<T>(state);
+}
+
+template <typename T>
+void promise<T>::set_value(const T& value) const {
+ std::unique_lock<std::mutex> lock(state->mutex);
+ state->val = value;
+ state->hasVal = true;
+ state->cv.notify_all();
+}
+
+template <typename T>
+void promise<T>::set_value(T&& value) const {
+ std::unique_lock<std::mutex> lock(state->mutex);
+ state->val = std::move(value);
+ state->hasVal = true;
+ state->cv.notify_all();
+}
+
+} // namespace lsp
+
+
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/json.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/json.h
index 98ee91b544..34e6232917 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/json.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/json.h
@@ -10,7 +10,7 @@ class JsonReader : public Reader {
std::vector<const char*> path_;
public:
- rapidjson::GenericValue<rapidjson::UTF8<>>* m_;
+ rapidjson::GenericValue<rapidjson::UTF8<>>* m_;
JsonReader(rapidjson::GenericValue<rapidjson::UTF8<>>* m) : m_(m) {}
SerializeFormat Format() const override { return SerializeFormat::Json; }
@@ -35,10 +35,10 @@ class JsonReader : public Reader {
bool HasMember(const char* x) override
{
- if (m_->IsObject())
- return m_->HasMember(x);
- else
- return false;
+ if (m_->IsObject())
+ return m_->HasMember(x);
+ else
+ return false;
}
std::unique_ptr<Reader> operator[](const char* x) override {
auto& sub = (*m_)[x];
@@ -59,7 +59,7 @@ class JsonReader : public Reader {
class JsonWriter : public Writer {
public:
- rapidjson::Writer<rapidjson::StringBuffer>* m_;
+ rapidjson::Writer<rapidjson::StringBuffer>* m_;
JsonWriter(rapidjson::Writer<rapidjson::StringBuffer>* m) : m_(m) {}
SerializeFormat Format() const override { return SerializeFormat::Json; }
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h
index 87e94669ab..2efc80b19a 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h
@@ -3,49 +3,49 @@
#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;
+ // 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;
- }
+ 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
+std::string ToString(const lsRequestId& id);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h
index ba94167cf8..68ad502b0c 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h
@@ -7,65 +7,65 @@
struct ResponseInMessage :public LspMessage {
- lsRequestId id;
- std::string m_methodType;
+ lsRequestId id;
+ std::string m_methodType;
- virtual MethodType GetMethodType() const override
- {
- return m_methodType.data();
- };
- virtual void SetMethodType(MethodType _type) override
- {
- m_methodType = _type;
- };
+ 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;
- }
+ Kind GetKid() override
+ {
+ return RESPONCE_MESSAGE;
+ }
+ virtual bool IsErrorType()
+ {
+ return false;
+ }
};
template <class TDerived >
struct BaseResponseMessage : ResponseInMessage {
- void ReflectWriter(Writer& writer) override {
- Reflect(writer, static_cast<TDerived&>(*this));
- }
- static std::unique_ptr<LspMessage> ReflectReader(Reader& visitor) {
+ void ReflectWriter(Writer& writer) override {
+ Reflect(writer, static_cast<TDerived&>(*this));
+ }
+ static std::unique_ptr<LspMessage> ReflectReader(Reader& visitor) {
- TDerived* temp = new TDerived();
- std::unique_ptr<TDerived> message = std::unique_ptr<TDerived>(temp);
- // Reflect may throw and *message will be partially deserialized.
- Reflect(visitor, static_cast<TDerived&>(*temp));
- return message;
- }
+ TDerived* temp = new TDerived();
+ std::unique_ptr<TDerived> message = std::unique_ptr<TDerived>(temp);
+ // Reflect may throw and *message will be partially deserialized.
+ Reflect(visitor, static_cast<TDerived&>(*temp));
+ return message;
+ }
};
template <class T, class TDerived >
struct ResponseMessage : BaseResponseMessage<TDerived> {
- T result;
- void swap(ResponseMessage<T, TDerived>& arg) noexcept
- {
- std::swap(result, arg.result);
- this->id.swap(arg.id);
- this->m_methodType.swap(arg.m_methodType);
- }
+ T result;
+ void swap(ResponseMessage<T, TDerived>& arg) noexcept
+ {
+ std::swap(result, arg.result);
+ this->id.swap(arg.id);
+ this->m_methodType.swap(arg.m_methodType);
+ }
};
template <class T, class TDerived >
struct ResponseError : BaseResponseMessage<TDerived> {
- T error;
- bool IsErrorType() override { return true; }
- void swap(ResponseError<T, TDerived>& arg) noexcept
- {
+ T error;
+ bool IsErrorType() override { return true; }
+ void swap(ResponseError<T, TDerived>& arg) noexcept
+ {
- this->id.swap(arg.id);
- this->m_methodType.swap(arg.m_methodType);
- std::swap(error, arg.error);
- }
+ 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
index f09ba5b1a7..19a9634286 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/macro_map.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/macro_map.h
@@ -27,7 +27,7 @@ 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)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/message.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/message.h
index 6603f3fb3a..57f4932520 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/message.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/message.h
@@ -9,26 +9,26 @@
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() ;
-
+ 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
index 71b6bede59..477c822845 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/serializer.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/serializer.h
@@ -24,64 +24,64 @@ enum class SerializeFormat { Json, MessagePack };
// A tag type that can be used to write `null` to json.
struct JsonNull
{
- void swap(JsonNull& arg) noexcept;
+ 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 ~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<Reader> operator[](const char* x) = 0;
- virtual void IterMap( std::function<void(const char*, Reader&)> fn) = 0;
- virtual void IterArray(std::function<void(Reader&)> fn) = 0;
- virtual void DoMember(const char* name, std::function<void(Reader&)> fn) = 0;
- virtual std::string ToString() const = 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<Reader> operator[](const char* x) = 0;
+ virtual void IterMap( std::function<void(const char*, Reader&)> fn) = 0;
+ virtual void IterArray(std::function<void(Reader&)> fn) = 0;
+ virtual void DoMember(const char* name, std::function<void(Reader&)> 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;
+ 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;
};
@@ -130,9 +130,9 @@ struct optionals_mandatory_tag {};
#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_SWAP_METHOD(type, ...) \
+void swap(type& arg) noexcept{ \
+ MACRO_MAP(_MAPPABLE_SWAP_MEMBER, __VA_ARGS__) \
}
#define MAKE_REFLECT_STRUCT_OPTIONALS_MANDATORY(type, ...) \
@@ -208,171 +208,171 @@ void Reflect(Writer& visitor, SerializeFormat& value);
template <typename T>
void Reflect(Reader& visitor, boost::optional<T>& value) {
- if (visitor.IsNull()) {
- visitor.GetNull();
- return;
- }
- T real_value;
- Reflect(visitor, real_value);
- value = std::move(real_value);
+ if (visitor.IsNull()) {
+ visitor.GetNull();
+ return;
+ }
+ T real_value;
+ Reflect(visitor, real_value);
+ value = std::move(real_value);
}
template <typename T>
void Reflect(Writer& visitor, boost::optional<T>& value) {
- if (value)
- Reflect(visitor, *value);
- else
- visitor.Null();
+ if (value)
+ Reflect(visitor, *value);
+ else
+ visitor.Null();
}
template <typename T>
void ReflectMember(Writer& visitor, const char* name, boost::optional<T>& 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);
- }
+ // 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 <typename T>
void ReflectMember(Writer& visitor,
- const char* name,
- T& value,
- optionals_mandatory_tag) {
- visitor.Key(name);
- Reflect(visitor, value);
+ const char* name,
+ T& value,
+ optionals_mandatory_tag) {
+ visitor.Key(name);
+ Reflect(visitor, value);
}
template <typename T>
void ReflectMember(Reader& visitor,
- const char* name,
- T& value,
- optionals_mandatory_tag) {
- Reflect(visitor, value);
+ const char* name,
+ T& value,
+ optionals_mandatory_tag) {
+ Reflect(visitor, value);
}
template<class T >
void Reflect(Reader& visitor, std::map<std::string, T>& value)
{
- visitor.IterMap([&](const char* name,Reader& entry) {
- T entry_value;
- Reflect(entry, entry_value);
- value[name]=(std::move(entry_value));
- });
+ visitor.IterMap([&](const char* name,Reader& entry) {
+ T entry_value;
+ Reflect(entry, entry_value);
+ value[name]=(std::move(entry_value));
+ });
}
template<class _Ty >
void Reflect(Writer& visitor, std::map<std::string, _Ty>& value)
{
- REFLECT_MEMBER_START();
- for (auto& it : value)
- {
- visitor.Key(it.first.c_str());
- Reflect(visitor, it.second);
- }
- REFLECT_MEMBER_END();
+ REFLECT_MEMBER_START();
+ for (auto& it : value)
+ {
+ visitor.Key(it.first.c_str());
+ Reflect(visitor, it.second);
+ }
+ REFLECT_MEMBER_END();
}
// std::vector
template <typename T>
void Reflect(Reader& visitor, std::vector<T>& values) {
- visitor.IterArray([&](Reader& entry) {
- T entry_value;
- Reflect(entry, entry_value);
- values.push_back(std::move(entry_value));
- });
+ visitor.IterArray([&](Reader& entry) {
+ T entry_value;
+ Reflect(entry, entry_value);
+ values.push_back(std::move(entry_value));
+ });
}
template <typename T>
void Reflect(Writer& visitor, std::vector<T>& values) {
- visitor.StartArray(values.size());
- for (auto& value : values)
- Reflect(visitor, value);
- visitor.EndArray();
+ visitor.StartArray(values.size());
+ for (auto& value : values)
+ Reflect(visitor, value);
+ visitor.EndArray();
}
// ReflectMember
inline void DefaultReflectMemberStart(Writer& visitor) {
- visitor.StartObject();
+ visitor.StartObject();
}
inline void DefaultReflectMemberStart(Reader& visitor) {}
template <typename T>
bool ReflectMemberStart(Reader& visitor, T& value) {
- return false;
+ return false;
}
template <typename T>
bool ReflectMemberStart(Writer& visitor, T& value) {
- visitor.StartObject();
- return true;
+ visitor.StartObject();
+ return true;
}
template <typename T>
void ReflectMemberEnd(Reader& visitor, T& value) {}
template <typename T>
void ReflectMemberEnd(Writer& visitor, T& value) {
- visitor.EndObject();
+ visitor.EndObject();
}
template <typename T>
void ReflectMember(Reader& visitor, const char* name, T& value) {
- visitor.DoMember(name, [&](Reader& child) { Reflect(child, value); });
+ visitor.DoMember(name, [&](Reader& child) { Reflect(child, value); });
}
template <typename T>
void ReflectMember(Writer& visitor, const char* name, T& value) {
- visitor.Key(name);
- Reflect(visitor, value);
+ visitor.Key(name);
+ Reflect(visitor, value);
}
template<class _Ty1, class _Ty2>
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);
- }
+ if (value.first)
+ {
+ Reflect(visitor, value.first);
+ }
+ else
+ {
+ Reflect(visitor, value.second);
+ }
}
template<class _Ty2>
void Reflect(Reader& visitor, std::pair< boost::optional<bool>, boost::optional<_Ty2> >& value)
{
- if(visitor.IsBool())
- {
- Reflect(visitor, value.first);
- return;
- }
+ if(visitor.IsBool())
+ {
+ Reflect(visitor, value.first);
+ return;
+ }
- Reflect(visitor, value.second);
+ Reflect(visitor, value.second);
}
template<class _Ty2>
void Reflect(Reader& visitor, std::pair< boost::optional<std::string>, boost::optional<_Ty2> >& value)
{
- if (visitor.IsString())
- {
- Reflect(visitor, value.first);
- return;
- }
+ if (visitor.IsString())
+ {
+ Reflect(visitor, value.first);
+ return;
+ }
- Reflect(visitor, value.second);
+ Reflect(visitor, value.second);
}
template<class _Ty1, class _Ty2>
void Reflect(Reader& visitor, std::pair< boost::optional<_Ty1>, boost::optional<_Ty2> >& value)
{
- try
- {
- Reflect(visitor, value.second);
- }
- catch (...)
- {
- Reflect(visitor, value.first);
- }
+ 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
index 549c361950..3dd3def993 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/stream.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/stream.h
@@ -3,194 +3,194 @@
#include <string>
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 T >
- 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 T >
- 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 T >
- 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;
- };
+ 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 T >
+ 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 T >
+ 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 T >
+ 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
index cca9f9a486..3e1ba547ca 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/threaded_queue.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/threaded_queue.h
@@ -57,23 +57,23 @@ struct MultiQueueWaiter {
static bool HasState(std::initializer_list<BaseThreadQueue*> queues);
bool ValidateWaiter(std::initializer_list<BaseThreadQueue*> queues);
-
+
template <typename... BaseThreadQueue>
bool Wait(std::atomic<bool>& quit, BaseThreadQueue... queues) {
- MultiQueueLock<BaseThreadQueue...> l(queues...);
- while (!quit.load(std::memory_order_relaxed)) {
- if (HasState({ queues... }))
- return false;
- cv.wait(l);
- }
- return true;
+ MultiQueueLock<BaseThreadQueue...> l(queues...);
+ while (!quit.load(std::memory_order_relaxed)) {
+ if (HasState({ queues... }))
+ return false;
+ cv.wait(l);
+ }
+ return true;
}
template <typename... BaseThreadQueue>
void WaitUntil(std::chrono::steady_clock::time_point t,
- BaseThreadQueue... queues) {
- MultiQueueLock<BaseThreadQueue...> l(queues...);
- if (!HasState({ queues... }))
- cv.wait_until(l, t);
+ BaseThreadQueue... queues) {
+ MultiQueueLock<BaseThreadQueue...> l(queues...);
+ if (!HasState({ queues... }))
+ cv.wait_until(l, t);
}
template <typename... BaseThreadQueue>
void Wait(BaseThreadQueue... queues) {
@@ -181,22 +181,22 @@ struct ThreadedQueue : public BaseThreadQueue {
}
// Return all elements in the queue.
std::vector<T> DequeueAll() {
- std::lock_guard<std::mutex> lock(mutex);
-
- total_count_ = 0;
-
- std::vector<T> 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::lock_guard<std::mutex> lock(mutex);
+
+ total_count_ = 0;
+
+ std::vector<T> 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<T> TryDequeueSome(size_t num) {
std::lock_guard<std::mutex> lock(mutex);
@@ -213,7 +213,7 @@ struct ThreadedQueue : public BaseThreadQueue {
}
else
{
- break;
+ break;
}
num -= 1;
}
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/AbsolutePath.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/AbsolutePath.h
index ef1ee43860..4f9aae0851 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/AbsolutePath.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/AbsolutePath.h
@@ -4,21 +4,21 @@
#include <string>
struct AbsolutePath {
- static AbsolutePath BuildDoNotUse(const std::string& path);
+ static AbsolutePath BuildDoNotUse(const std::string& path);
- // Try not to use this.
- AbsolutePath();
+ // 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;
+ // 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;
+ 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;
};
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ClientPreferences.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ClientPreferences.h
index 7adf557f83..29ab82b1c6 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ClientPreferences.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ClientPreferences.h
@@ -9,298 +9,298 @@ class ClientPreferences
{
public:
- std::shared_ptr<lsWorkspaceClientCapabilites> 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<lsWorkspaceClientCapabilites>(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<typename T>
- static bool isDynamicRegistrationSupported(boost::optional<T>& capability)
- {
- if(capability)
- return (capability.value().dynamicRegistration.value());
- return false;
- }
-
- bool isTrue(const boost::optional<bool>& 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<std::string>& 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<bool>,
- boost::optional<DiagnosticsTagSupport> > >& 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);
- }
+ std::shared_ptr<lsWorkspaceClientCapabilites> 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<lsWorkspaceClientCapabilites>(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<typename T>
+ static bool isDynamicRegistrationSupported(boost::optional<T>& capability)
+ {
+ if(capability)
+ return (capability.value().dynamicRegistration.value());
+ return false;
+ }
+
+ bool isTrue(const boost::optional<bool>& 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<std::string>& 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<bool>,
+ boost::optional<DiagnosticsTagSupport> > >& 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
index a1e3f1dcc1..1704dd33c6 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/CodeActionParams.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/CodeActionParams.h
@@ -7,98 +7,98 @@
#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;
- };
+ 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<lsDiagnostic> 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<std::vector<std::string>> only;
-
- MAKE_SWAP_METHOD(lsCodeActionContext,
- diagnostics, only);
+ // An array of diagnostics.
+ std::vector<lsDiagnostic> 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<std::vector<std::string>> only;
+
+ MAKE_SWAP_METHOD(lsCodeActionContext,
+ diagnostics, only);
};
MAKE_REFLECT_STRUCT(lsCodeActionContext,
- diagnostics, only);
+ 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);
+ // 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,
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/Directory.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/Directory.h
index 93f2c0807d..77b6cbb3e7 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/Directory.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/Directory.h
@@ -4,10 +4,10 @@
struct AbsolutePath;
struct Directory {
- explicit Directory(const AbsolutePath& path);
+ explicit Directory(const AbsolutePath& path);
- bool operator==(const Directory& rhs) const;
- bool operator!=(const Directory& rhs) const;
+ bool operator==(const Directory& rhs) const;
+ bool operator!=(const Directory& rhs) const;
- std::string path;
+ std::string path;
};
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ExecuteCommandParams.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ExecuteCommandParams.h
index c06eed4b1c..5ad4e07d8d 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ExecuteCommandParams.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ExecuteCommandParams.h
@@ -2,19 +2,19 @@
#include "lsAny.h"
struct ExecuteCommandParams {
- /**
- * The identifier of the actual command handler.
- */
+ /**
+ * The identifier of the actual command handler.
+ */
- std::string command;
+ 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<std::vector<lsp::Any>> arguments;
-
- MAKE_SWAP_METHOD(ExecuteCommandParams, command, arguments);
+ /**
+ * 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<std::vector<lsp::Any>> 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
index bf1337e44f..369ebb2a6d 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/IProgressMonitor.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/IProgressMonitor.h
@@ -2,7 +2,7 @@
#include <string>
-namespace lsp {
+namespace lsp {
/**
* The <code>IProgressMonitor</code> interface is implemented
* by objects that monitor the progress of an activity; the methods
@@ -36,110 +36,108 @@ namespace lsp {
* Clients may implement this interface.
* </p>
*/
- 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 <code>UNKNOWN</code>
- * 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 </code>worked(int)</code>.
- */
- 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 <code>true</code> if cancellation has been requested,
- * and <code>false</code> otherwise
- * @see #setCanceled
- */
- virtual bool isCanceled() = 0;
- /**
- * Sets the cancel state to the given value.
- *
- * @param value <code>true</code> indicates that cancelation has
- * been requested (but not necessarily acknowledged);
- * <code>false</code> 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;
- };
+ 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 <code>UNKNOWN</code>
+ * 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 <code>worked(int)</code>.
+ */
+ 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 <code>true</code> if cancellation has been requested,
+ * and <code>false</code> otherwise
+ * @see #setCanceled
+ */
+ virtual bool isCanceled() = 0;
+ /**
+ * Sets the cancel state to the given value.
+ *
+ * @param value <code>true</code> indicates that cancelation has
+ * been requested (but not necessarily acknowledged);
+ * <code>false</code> 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
index 92d773db0c..1618939c69 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/Markup.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/Markup.h
@@ -1,5 +1,5 @@
#pragma once
-#include <cctype>
+#include <cctype>
#include <clocale>
#include <cstddef>
#include <memory>
@@ -11,7 +11,7 @@
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.
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/string_ref.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/string_ref.h
index 220817a1a2..bac8fbbaf5 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/string_ref.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/string_ref.h
@@ -12,877 +12,877 @@
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 <typename T>
- //std::enable_if_t<std::numeric_limits<T>::is_signed, bool>
- // getAsInteger(unsigned Radix, T& Result) const {
- // long long LLVal;
- // if (getAsSignedInteger(*this, Radix, LLVal) ||
- // static_cast<T>(LLVal) != LLVal)
- // return true;
- // Result = LLVal;
- // return false;
- //}
-
- //template <typename T>
- //std::enable_if_t<!std::numeric_limits<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<unsigned long long>(static_cast<T>(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 <class InputIterator>
- 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<string_ref> split(size_type limit = npos) const
- {
- vector<string_ref> 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<std::string_ref> v = s.split('|');
- * std::copy(v.begin(), v.end(), std::ostream_iterator<std::string_ref>(std::cout, "\n"));
- *
- * This
- * is
- * a
- * test.
- * @endcode
- */
- vector<string_ref> split(value_type separator, size_type limit = npos) const
- {
- vector<string_ref> 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<string_ref> split(const string &separator, size_type limit = npos) const
- {
- vector<string_ref> 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<std::string_ref> v = s.chunk_split(3);
- * std::copy(v.begin(), v.end(), ostream_iterator<std::string_ref>(cout, " "));
- *
- * abc def ghi jk
- * @endcode
- */
- vector<string_ref> chunk_split(size_type chunklen) const
- {
- vector<string_ref> 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<std::string_ref> 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 <class InputIterator>
- 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 <class InputIterator>
- 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<bool(char)> 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<bool(char)> 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, ...)
- {
+ /**
+ * 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 <typename T>
+ //std::enable_if_t<std::numeric_limits<T>::is_signed, bool>
+ // getAsInteger(unsigned Radix, T& Result) const {
+ // long long LLVal;
+ // if (getAsSignedInteger(*this, Radix, LLVal) ||
+ // static_cast<T>(LLVal) != LLVal)
+ // return true;
+ // Result = LLVal;
+ // return false;
+ //}
+
+ //template <typename T>
+ //std::enable_if_t<!std::numeric_limits<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<unsigned long long>(static_cast<T>(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 <class InputIterator>
+ 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<string_ref> split(size_type limit = npos) const
+ {
+ vector<string_ref> 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<std::string_ref> v = s.split('|');
+ * std::copy(v.begin(), v.end(), std::ostream_iterator<std::string_ref>(std::cout, "\n"));
+ *
+ * This
+ * is
+ * a
+ * test.
+ * @endcode
+ */
+ vector<string_ref> split(value_type separator, size_type limit = npos) const
+ {
+ vector<string_ref> 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<string_ref> split(const string &separator, size_type limit = npos) const
+ {
+ vector<string_ref> 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<std::string_ref> v = s.chunk_split(3);
+ * std::copy(v.begin(), v.end(), ostream_iterator<std::string_ref>(cout, " "));
+ *
+ * abc def ghi jk
+ * @endcode
+ */
+ vector<string_ref> chunk_split(size_type chunklen) const
+ {
+ vector<string_ref> 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<std::string_ref> 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 <class InputIterator>
+ 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 <class InputIterator>
+ 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<bool(char)> 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<bool(char)> 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;
@@ -912,150 +912,150 @@ namespace std
#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
- {
+ }
+
+ /*******************************************************************************
+ 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());
+ return _stricmp(this->c_str(), str.c_str());
#else
- return strcasecmp(this->c_str(), str.c_str());
+ 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);
- }
-
- };
+ }
+
+ /*******************************************************************************
+ 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
index fa84e4109a..6d082d2d2a 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ParentProcessWatcher.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ParentProcessWatcher.h
@@ -6,12 +6,12 @@
class ParentProcessWatcher
{
public:
- struct ParentProcessWatcherData;
+ struct ParentProcessWatcherData;
- ParentProcessWatcher(lsp::Log& log, int pid, const std::function<void()>&& callback, uint32_t poll_delay_secs = 10);
+ ParentProcessWatcher(lsp::Log& log, int pid, const std::function<void()>&& callback, uint32_t poll_delay_secs = 10);
- ~ParentProcessWatcher();
+ ~ParentProcessWatcher();
- std::shared_ptr<ParentProcessWatcherData> d_ptr;
+ std::shared_ptr<ParentProcessWatcherData> d_ptr;
};
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProcessIoService.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProcessIoService.h
index 1389a1d5b7..5edecef0b2 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProcessIoService.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProcessIoService.h
@@ -4,45 +4,45 @@
namespace lsp
{
- class ProcessIoService
- {
- public:
- using IOService = boost::asio::io_service;
- using Work = boost::asio::io_service::work;
- using WorkPtr = std::unique_ptr<Work>;
+ class ProcessIoService
+ {
+ public:
+ using IOService = boost::asio::io_service;
+ using Work = boost::asio::io_service::work;
+ using WorkPtr = std::unique_ptr<Work>;
- ProcessIoService() {
+ ProcessIoService() {
- work_ = std::unique_ptr<Work>(new Work(ioService_));
- auto temp_thread_ = new std::thread([this]
- {
- ioService_.run();
- });
- thread_ = std::unique_ptr<std::thread>(temp_thread_);
- }
+ work_ = std::unique_ptr<Work>(new Work(ioService_));
+ auto temp_thread_ = new std::thread([this]
+ {
+ ioService_.run();
+ });
+ thread_ = std::unique_ptr<std::thread>(temp_thread_);
+ }
- ProcessIoService(const ProcessIoService&) = delete;
- ProcessIoService& operator=(const ProcessIoService&) = delete;
+ ProcessIoService(const ProcessIoService&) = delete;
+ ProcessIoService& operator=(const ProcessIoService&) = delete;
- boost::asio::io_service& getIOService()
- {
- return ioService_;
- }
+ boost::asio::io_service& getIOService()
+ {
+ return ioService_;
+ }
- void stop()
- {
+ void stop()
+ {
- work_.reset();
+ work_.reset();
- thread_->join();
+ thread_->join();
- }
+ }
- private:
- IOService ioService_;
- WorkPtr work_;
- std::unique_ptr<std::thread> thread_;
+ private:
+ IOService ioService_;
+ WorkPtr work_;
+ std::unique_ptr<std::thread> thread_;
- };
+ };
}
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProtocolJsonHandler.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProtocolJsonHandler.h
index b563f810d2..f6097fe172 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProtocolJsonHandler.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProtocolJsonHandler.h
@@ -2,10 +2,10 @@
#include "LibLsp/JsonRpc/MessageJsonHandler.h"
namespace lsp {
- class ProtocolJsonHandler : public MessageJsonHandler
- {
- public:
- ProtocolJsonHandler();
- };
+ 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
index caf2ea5d5f..ea60205900 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ResourceOperation.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ResourceOperation.h
@@ -6,116 +6,116 @@
#include "LibLsp/lsp/lsAny.h"
#include "LibLsp/lsp/lsTextEdit.h"
struct ResourceOperation {
- std::string kind;
- virtual ~ResourceOperation() = default;
-
- MAKE_SWAP_METHOD(ResourceOperation, kind);
+ 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<bool> overwrite = false;
-
- /**
- * Ignore if exists.
- */
- boost::optional< bool> ignoreIfExists =false;
-
- MAKE_SWAP_METHOD(CreateFileOptions, overwrite, ignoreIfExists)
+ /**
+ * Overwrite existing file. Overwrite wins over `ignoreIfExists`
+ */
+ boost::optional<bool> 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<CreateFileOptions> options;
-
-
- /**
- * An optional annotation identifer describing the operation.
- *
- * @since 3.16.0
- */
- boost::optional<lsChangeAnnotationIdentifier> annotationId;
-
- MAKE_SWAP_METHOD(lsCreateFile, kind, uri, options, annotationId)
+ /**
+ * The resource to create.
+ */
+ lsCreateFile();
+ lsDocumentUri uri;
+
+ /**
+ * Additional options
+ */
+ boost::optional<CreateFileOptions> options;
+
+
+ /**
+ * An optional annotation identifer describing the operation.
+ *
+ * @since 3.16.0
+ */
+ boost::optional<lsChangeAnnotationIdentifier> 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<bool> recursive = false;
+ /**
+ * Delete the content recursively if a folder is denoted.
+ */
+ boost::optional<bool> recursive = false;
- /**
- * Ignore the operation if the file doesn't exist.
- */
- boost::optional<bool> ignoreIfNotExists = false;
+ /**
+ * Ignore the operation if the file doesn't exist.
+ */
+ boost::optional<bool> ignoreIfNotExists = false;
- MAKE_SWAP_METHOD(DeleteFileOptions, recursive, ignoreIfNotExists);
+ 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<DeleteFileOptions> options;
-
- MAKE_SWAP_METHOD(lsDeleteFile, kind, uri, options);
+ /**
+ * The file to delete.
+ */
+ lsDeleteFile();
+ lsDocumentUri uri;
+
+ /**
+ * Delete options.
+ */
+ boost::optional<DeleteFileOptions> 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<RenameFileOptions> options;
-
- /**
- * An optional annotation identifer describing the operation.
- *
- * @since 3.16.0
- */
- boost::optional<lsChangeAnnotationIdentifier> annotationId;
-
- MAKE_SWAP_METHOD(lsRenameFile, kind, oldUri, newUri, options, annotationId)
+ /**
+ * The old (existing) location.
+ */
+ lsRenameFile();
+ lsDocumentUri oldUri;
+
+ /**
+ * The new location.
+ */
+
+ lsDocumentUri newUri;
+
+ /**
+ * Rename options.
+ */
+ boost::optional<RenameFileOptions> options;
+
+ /**
+ * An optional annotation identifer describing the operation.
+ *
+ * @since 3.16.0
+ */
+ boost::optional<lsChangeAnnotationIdentifier> 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
+extern ResourceOperation* GetResourceOperation(lsp::Any& lspAny);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/SimpleTimer.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/SimpleTimer.h
index 0a2707979d..3178d25d69 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/SimpleTimer.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/SimpleTimer.h
@@ -9,7 +9,7 @@ class SimpleTimer
{
public:
SimpleTimer(unsigned int duration,const std::function<void()>& _call_back)
- :is_running_(true), call_back(_call_back), _deadline_timer(_ios, Duration(duration))
+ :is_running_(true), call_back(_call_back), _deadline_timer(_ios, Duration(duration))
{
_deadline_timer.async_wait([&](const boost::system::error_code& e)
{
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/registerCapability.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/registerCapability.h
index fa5d111403..60484db56a 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/registerCapability.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/registerCapability.h
@@ -7,20 +7,20 @@
*/
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);
+ 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);
};
@@ -35,8 +35,8 @@ MAKE_REFLECT_STRUCT(Registration, id, method);
*/
struct RegistrationParams
{
- std::vector<Registration> registrations;
- MAKE_SWAP_METHOD(RegistrationParams, registrations);
+ std::vector<Registration> registrations;
+ MAKE_SWAP_METHOD(RegistrationParams, registrations);
};
/**
* The client/registerCapability request is sent from the server to the client
@@ -46,4 +46,4 @@ struct RegistrationParams
*/
MAKE_REFLECT_STRUCT(RegistrationParams, registrations);
-DEFINE_REQUEST_RESPONSE_TYPE(Req_ClientRegisterCapability, RegistrationParams,JsonNull, "client/registerCapability"); \ No newline at end of file
+DEFINE_REQUEST_RESPONSE_TYPE(Req_ClientRegisterCapability, RegistrationParams,JsonNull, "client/registerCapability");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/unregisterCapability.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/unregisterCapability.h
index aa51d7efee..33bf9d1db6 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/unregisterCapability.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/unregisterCapability.h
@@ -10,20 +10,20 @@
*/
struct Unregistration {
- /**
- * The id used to unregister the request or notification. Usually an id
- * provided during the register request.
- */
+ /**
+ * The id used to unregister the request or notification. Usually an id
+ * provided during the register request.
+ */
- std::string id;
+ std::string id;
- /**
- * The method / capability to unregister for.
- */
+ /**
+ * The method / capability to unregister for.
+ */
- std::string method;
-
- MAKE_SWAP_METHOD(Unregistration, id, method);
+ std::string method;
+
+ MAKE_SWAP_METHOD(Unregistration, id, method);
};
MAKE_REFLECT_STRUCT(Unregistration, id, method);
/**
@@ -32,10 +32,10 @@ MAKE_REFLECT_STRUCT(Unregistration, id, method);
*/
struct UnregistrationParams
{
- std::vector<Unregistration> unregisterations;
- MAKE_SWAP_METHOD(UnregistrationParams, unregisterations);
+ std::vector<Unregistration> 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
+DEFINE_REQUEST_RESPONSE_TYPE(Req_ClientUnregisterCapability, UnregistrationParams,JsonNull, "client/unregisterCapability");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/OverridableMethod.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/OverridableMethod.h
index cfb17fdf34..dd0ada60cc 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/OverridableMethod.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/OverridableMethod.h
@@ -4,31 +4,31 @@
#include <string>
struct OverridableMethod
{
- std::string bindingKey;
- std::string name;
- std::vector<std::string> parameters;
- bool unimplemented = false;
- std::string declaringClass;
- std::string declaringClassType;
+ std::string bindingKey;
+ std::string name;
+ std::vector<std::string> 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);
- }
+ 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<OverridableMethod> methods;
+ std::string type;
+ std::vector<OverridableMethod> methods;
- MAKE_SWAP_METHOD(OverridableMethodsResponse, type, 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
index c7faa94d6c..c8ddbe3c01 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h
@@ -6,8 +6,8 @@
struct WorkspaceSymbolParams
{
- std::string query;
- MAKE_SWAP_METHOD(WorkspaceSymbolParams, query);
+ 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
index 5da14a452a..527b3b1827 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/addOverridableMethods.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/addOverridableMethods.h
@@ -6,10 +6,10 @@
#include "LibLsp/JsonRpc/RequestInMessage.h"
#include "LibLsp/JsonRpc/lsResponseMessage.h"
struct AddOverridableMethodParams {
- lsCodeActionParams context;
- std::vector<OverridableMethod> overridableMethods;
+ lsCodeActionParams context;
+ std::vector<OverridableMethod> overridableMethods;
- MAKE_SWAP_METHOD(AddOverridableMethodParams, context, overridableMethods);
+ MAKE_SWAP_METHOD(AddOverridableMethodParams, context, overridableMethods);
};
MAKE_REFLECT_STRUCT(AddOverridableMethodParams, context, overridableMethods);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/buildWorkspace.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/buildWorkspace.h
index a2c2c062cc..4809e360bb 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/buildWorkspace.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/buildWorkspace.h
@@ -10,8 +10,8 @@
enum class BuildWorkspaceStatus : uint8_t{
- FAILED, SUCCEED, WITH_ERROR, CANCELLED,
+ 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
+DEFINE_REQUEST_RESPONSE_TYPE(java_buildWorkspace, bool, BuildWorkspaceStatus, "java/buildWorkspace");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h
index 261a0cc551..acb1e4caa6 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h
@@ -6,19 +6,19 @@
#include "checkHashCodeEqualsStatus.h"
struct LspMethodBinding {
- std::string bindingKey;
- std::string name;
- std::vector< std::string> parameters;
+ std::string bindingKey;
+ std::string name;
+ std::vector< std::string> parameters;
- MAKE_SWAP_METHOD(LspMethodBinding, bindingKey, name, parameters);
+ MAKE_SWAP_METHOD(LspMethodBinding, bindingKey, name, parameters);
};
MAKE_REFLECT_STRUCT(LspMethodBinding, bindingKey, name, parameters);
struct CheckConstructorsResponse {
- std::vector<LspMethodBinding> constructors;
- std::vector<LspVariableBinding> fields;
- MAKE_SWAP_METHOD(CheckConstructorsResponse, constructors, fields)
+ std::vector<LspMethodBinding> constructors;
+ std::vector<LspVariableBinding> fields;
+ MAKE_SWAP_METHOD(CheckConstructorsResponse, constructors, fields)
};
MAKE_REFLECT_STRUCT(CheckConstructorsResponse, constructors,fields)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h
index 729639eafa..68a7ed6606 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h
@@ -8,22 +8,22 @@
#include "checkConstructorsStatus.h"
struct LspDelegateField {
- LspVariableBinding field;
- std::vector<LspMethodBinding> delegateMethods;
+ LspVariableBinding field;
+ std::vector<LspMethodBinding> delegateMethods;
- MAKE_SWAP_METHOD(LspDelegateField, field, delegateMethods);
+ MAKE_SWAP_METHOD(LspDelegateField, field, delegateMethods);
};
MAKE_REFLECT_STRUCT(LspDelegateField, field, delegateMethods);
struct CheckDelegateMethodsResponse {
- std::vector<LspDelegateField> delegateFields;
+ std::vector<LspDelegateField> delegateFields;
- MAKE_SWAP_METHOD(CheckDelegateMethodsResponse, delegateFields)
+ MAKE_SWAP_METHOD(CheckDelegateMethodsResponse, delegateFields)
};
MAKE_REFLECT_STRUCT(CheckDelegateMethodsResponse, delegateFields)
DEFINE_REQUEST_RESPONSE_TYPE(java_checkDelegateMethodsStatus,
- lsCodeActionParams, CheckDelegateMethodsResponse, "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
index 1d9652dd44..88731c29b5 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h
@@ -8,29 +8,29 @@
#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);
- }
+ 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<LspVariableBinding> fields;
- std::vector<std::string> existingMethods;
- MAKE_SWAP_METHOD(CheckHashCodeEqualsResponse, type, fields, type, existingMethods)
+ std::string type;
+ std::vector<LspVariableBinding> fields;
+ std::vector<std::string> 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")
+ 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
index 24580d94c0..cadb5ba7dd 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkToStringStatus.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkToStringStatus.h
@@ -6,19 +6,19 @@
#include "LibLsp/lsp/CodeActionParams.h"
#include "checkHashCodeEqualsStatus.h"
struct CheckToStringResponse {
- std::string type;
- std::vector<LspVariableBinding> fields;
- bool exists;
- void swap(CheckToStringResponse& arg) noexcept
- {
- type.swap(arg.type);
- fields.swap(arg.fields);
- std::swap(exists, arg.exists);
- }
+ std::string type;
+ std::vector<LspVariableBinding> 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")
+ lsCodeActionParams, CheckToStringResponse ,"java/checkToStringStatus")
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/codeActionResult.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/codeActionResult.h
index 02024e3d93..c0195908d0 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/codeActionResult.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/codeActionResult.h
@@ -9,14 +9,14 @@
namespace SourceAssistProcessor {
- /*std::set<std::string> UNSUPPORTED_RESOURCES = { "module-info.java", "package-info.java"
- };*/
+ /*std::set<std::string> 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";
+// 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
index 92d4a3627b..19479adfaf 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/executeCommand.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/executeCommand.h
@@ -6,20 +6,20 @@
#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* 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* UPDATE_SOURCE_ATTACHMENT = "java.project.updateSourceAttachment";
-// static const char* ADD_TO_SOURCEPATH = "java.project.addToSourcePath";
+// static const char* ADD_TO_SOURCEPATH = "java.project.addToSourcePath";
-// static const char* REMOVE_FROM_SOURCEPATH = "java.project.removeFromSourcePath";
+// static const char* REMOVE_FROM_SOURCEPATH = "java.project.removeFromSourcePath";
-// static const char* LIST_SOURCEPATHS = "java.project.listSourcePaths";
- struct Result {
- bool status;
- std::string message;
- };
+// static const char* LIST_SOURCEPATHS = "java.project.listSourcePaths";
+ struct Result {
+ bool status;
+ std::string message;
+ };
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/findLinks.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/findLinks.h
index d184c675d8..fd470b17c8 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/findLinks.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/findLinks.h
@@ -8,11 +8,11 @@
#include "LibLsp/lsp/lsTextDocumentPositionParams.h"
struct FindLinksParams {
- // Supported link types: superImplementation
- std::string type;
- lsTextDocumentPositionParams position;
-
- MAKE_SWAP_METHOD(FindLinksParams, type, position)
+ // Supported link types: superImplementation
+ std::string type;
+ lsTextDocumentPositionParams position;
+
+ MAKE_SWAP_METHOD(FindLinksParams, type, position)
};
MAKE_REFLECT_STRUCT(FindLinksParams,type,position)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateAccessors.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateAccessors.h
index 200d840e94..82013096c7 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateAccessors.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateAccessors.h
@@ -8,11 +8,11 @@
struct GenerateAccessorsParams {
- lsCodeActionParams context;
- std::vector<AccessorField> accessors;
+ lsCodeActionParams context;
+ std::vector<AccessorField> accessors;
- MAKE_SWAP_METHOD(GenerateAccessorsParams, context, accessors)
+ MAKE_SWAP_METHOD(GenerateAccessorsParams, context, accessors)
};
MAKE_REFLECT_STRUCT(GenerateAccessorsParams, context, accessors)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateConstructors.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateConstructors.h
index 77c49a66a2..157fefed79 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateConstructors.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateConstructors.h
@@ -8,10 +8,10 @@
struct GenerateConstructorsParams {
- lsCodeActionParams context;
- std::vector<LspMethodBinding> constructors;
- std::vector< LspVariableBinding >fields;
- MAKE_SWAP_METHOD(GenerateConstructorsParams, context, fields)
+ lsCodeActionParams context;
+ std::vector<LspMethodBinding> constructors;
+ std::vector< LspVariableBinding >fields;
+ MAKE_SWAP_METHOD(GenerateConstructorsParams, context, fields)
};
MAKE_REFLECT_STRUCT(GenerateConstructorsParams, context, fields)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h
index 8958ae4d7e..c6b4729378 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h
@@ -7,17 +7,17 @@
#include "checkConstructorsStatus.h"
struct LspDelegateEntry {
- LspVariableBinding field;
- LspMethodBinding delegateMethod;
- MAKE_SWAP_METHOD(LspDelegateEntry, field, delegateMethod);
+ LspVariableBinding field;
+ LspMethodBinding delegateMethod;
+ MAKE_SWAP_METHOD(LspDelegateEntry, field, delegateMethod);
};
MAKE_REFLECT_STRUCT(LspDelegateEntry, field, delegateMethod);
struct GenerateDelegateMethodsParams {
- lsCodeActionParams context;
- std::vector<LspDelegateEntry> delegateEntries;
- MAKE_SWAP_METHOD(GenerateDelegateMethodsParams, context, delegateEntries)
+ lsCodeActionParams context;
+ std::vector<LspDelegateEntry> delegateEntries;
+ MAKE_SWAP_METHOD(GenerateDelegateMethodsParams, context, delegateEntries)
};
MAKE_REFLECT_STRUCT(GenerateDelegateMethodsParams, context, delegateEntries)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h
index 937c358733..0881d305b1 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h
@@ -8,15 +8,15 @@
#include "checkHashCodeEqualsStatus.h"
struct GenerateHashCodeEqualsParams {
- lsCodeActionParams context;
- std::vector<LspVariableBinding> fields;
- bool regenerate= false;
- void swap(GenerateHashCodeEqualsParams& arg) noexcept
- {
- context.swap(arg.context);
- fields.swap(arg.fields);
- std::swap(regenerate, arg.regenerate);
- }
+ lsCodeActionParams context;
+ std::vector<LspVariableBinding> 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);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateToString.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateToString.h
index 1f8ccc73b8..5e5324a59b 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateToString.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateToString.h
@@ -7,11 +7,11 @@
struct GenerateToStringParams {
- lsCodeActionParams context;
- std::vector< LspVariableBinding >fields;
-
- MAKE_SWAP_METHOD(GenerateToStringParams, context, fields)
-
+ lsCodeActionParams context;
+ std::vector< LspVariableBinding >fields;
+
+ MAKE_SWAP_METHOD(GenerateToStringParams, context, fields)
+
};
MAKE_REFLECT_STRUCT(GenerateToStringParams, context, fields)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h
index bcbf6f8c2b..56f09a0a53 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h
@@ -8,54 +8,54 @@
struct MoveKindInfo
{
- static std::string moveResource()
- {
- return "moveResource";
- }
- static std::string moveInstanceMethod()
- {
- return "moveInstanceMethod";
- }
- static std::string moveStaticMember()
- {
- return "moveStaticMember";
- }
+ 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<std::string> sourceUris;
- /**
- * The code action params when the move operation is triggered.
- */
- boost::optional<lsCodeActionParams> 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);
- }
+ /**
+ * The supported move kind: moveResource, moveInstanceMethod, moveStaticMember,
+ * moveTypeToNewFile.
+ */
+ std::string moveKind;
+ /**
+ * The selected resource uris when the move operation is triggered.
+ */
+ std::vector<std::string> sourceUris;
+ /**
+ * The code action params when the move operation is triggered.
+ */
+ boost::optional<lsCodeActionParams> 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<lsp::Any > destinations;
- MAKE_SWAP_METHOD(MoveDestinationsResponse, errorMessage, destinations);
+ std::string errorMessage;
+ std::vector<lsp::Any > destinations;
+ MAKE_SWAP_METHOD(MoveDestinationsResponse, errorMessage, destinations);
};
MAKE_REFLECT_STRUCT(MoveDestinationsResponse, errorMessage, destinations);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h
index e46327075a..131612dc2e 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h
@@ -15,40 +15,40 @@
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;
+ 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);
- }
+ 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<lsp::Any> commandArguments;
- lsCodeActionParams context;
- boost::optional<lsFormattingOptions> options;
- MAKE_SWAP_METHOD(GetRefactorEditParams, command, context, options);
+ std::string command;
+ std::vector<lsp::Any> commandArguments;
+ lsCodeActionParams context;
+ boost::optional<lsFormattingOptions> options;
+ MAKE_SWAP_METHOD(GetRefactorEditParams, command, context, options);
};
MAKE_REFLECT_STRUCT(GetRefactorEditParams, command, context, options);
@@ -56,20 +56,20 @@ 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<std::string> errorMessage;
-
- boost::optional < lsCommandWithAny > command;
-
- MAKE_SWAP_METHOD(RefactorWorkspaceEdit, edit, command, errorMessage)
+ /**
+ * 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<std::string> errorMessage;
+
+ boost::optional < lsCommandWithAny > command;
+
+ MAKE_SWAP_METHOD(RefactorWorkspaceEdit, edit, command, errorMessage)
};
MAKE_REFLECT_STRUCT(RefactorWorkspaceEdit,edit,command,errorMessage)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h
index ba77041474..f8bd8a4f7a 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h
@@ -7,16 +7,16 @@
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);
- }
+ 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)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/searchSymbols.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/searchSymbols.h
index ac8a2419f6..18a2f9999e 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/searchSymbols.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/searchSymbols.h
@@ -13,10 +13,10 @@
struct SearchSymbolParams :public WorkspaceSymbolParams
{
- boost::optional<std::string> projectName;
- boost::optional< bool >sourceOnly;
- boost::optional< int> maxResults;
- MAKE_SWAP_METHOD(SearchSymbolParams, query, projectName, sourceOnly, maxResults);
+ boost::optional<std::string> 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);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/sonarlint/protocol.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/sonarlint/protocol.h
index d81c3eaa63..0823469ba9 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/sonarlint/protocol.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/sonarlint/protocol.h
@@ -9,46 +9,46 @@
struct LintRule
{
- std::string key;
- std::string name;
+ std::string key;
+ std::string name;
- std::string Display() const
- {
- return name + " (" + key + ")";
- }
- bool activeByDefault = true;
- boost::optional<std::string> severity;
- boost::optional<std::string> type;
- int icon_index = -1;
- MAKE_SWAP_METHOD(LintRule, key, name, activeByDefault, severity, type);
+ std::string Display() const
+ {
+ return name + " (" + key + ")";
+ }
+ bool activeByDefault = true;
+ boost::optional<std::string> severity;
+ boost::optional<std::string> 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<std::string> description;
- boost::optional<std::string> defaultValue;
+ std::string name;
+ boost::optional<std::string> description;
+ boost::optional<std::string> defaultValue;
};
MAKE_REFLECT_STRUCT(RuleParameter, name, description, defaultValue);
struct ShowRuleDescriptionParams {
- boost::optional<std::string> key;
+ boost::optional<std::string> key;
- boost::optional<std::string> name;
+ boost::optional<std::string> name;
- boost::optional<std::string> htmlDescription;
+ boost::optional<std::string> htmlDescription;
- boost::optional<std::string> type;
+ boost::optional<std::string> type;
- boost::optional<std::string> severity;
+ boost::optional<std::string> severity;
- boost::optional< std::vector<RuleParameter> > parameters;
- MAKE_SWAP_METHOD(ShowRuleDescriptionParams, key, name, htmlDescription, type, severity, parameters)
+ boost::optional< std::vector<RuleParameter> > parameters;
+ MAKE_SWAP_METHOD(ShowRuleDescriptionParams, key, name, htmlDescription, type, severity, parameters)
};
@@ -56,96 +56,96 @@ MAKE_REFLECT_STRUCT(ShowRuleDescriptionParams, key, name, htmlDescription, type,
struct GetJavaConfigResponse {
- std::string projectRoot;
- std::string sourceLevel;
- std::vector<std::string> classpath;
- bool isTest;
- std::string vmLocation;
- MAKE_SWAP_METHOD(GetJavaConfigResponse, projectRoot, sourceLevel, classpath, isTest, vmLocation);
+ std::string projectRoot;
+ std::string sourceLevel;
+ std::vector<std::string> 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;
+ lsInitializeParams::lsTrace value;
};
MAKE_REFLECT_STRUCT(SetTraceNotificationParams, value);
struct ServerConnectionSettings {
- std::string SONARCLOUD_URL = "https://sonarcloud.io";
- std::vector<std::string>SONARCLOUD_ALIAS = { "https://sonarqube.com",
- "https://www.sonarqube.com",
- "https://www.sonarcloud.io",
- "https://sonarcloud.io" };
+ std::string SONARCLOUD_URL = "https://sonarcloud.io";
+ std::vector<std::string>SONARCLOUD_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<std::string> organizationKey;
- MAKE_SWAP_METHOD(ServerConnectionSettings, connectionId, serverUrl, token, organizationKey)
+ std::string connectionId;
+ std::string serverUrl;
+ std::string token;
+ boost::optional<std::string> 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<std::string, std::string > > parameters;
+ 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<std::string, std::string > > parameters;
};
MAKE_REFLECT_STRUCT(RuleSetting, level, parameters)
struct ConsoleParams
{
- boost::optional < bool >showAnalyzerLogs;
- boost::optional < bool >showVerboseLogs;
- MAKE_SWAP_METHOD(ConsoleParams, showAnalyzerLogs, showVerboseLogs)
+ 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<std::string, ServerConnectionSettings> >connectedMode;
- boost::optional<std::map<std::string, RuleSetting>> rules;
- boost::optional<ConsoleParams> output;
+ boost::optional < bool > disableTelemetry;
+ boost::optional < std::map<std::string, ServerConnectionSettings> >connectedMode;
+ boost::optional<std::map<std::string, RuleSetting>> rules;
+ boost::optional<ConsoleParams> output;
- boost::optional<std::string > pathToNodeExecutable;
+ boost::optional<std::string > pathToNodeExecutable;
- boost::optional< std::map<std::string, std::string > > getConfigurationParameters(const std::string& ruleKey);
+ boost::optional< std::map<std::string, std::string > > getConfigurationParameters(const std::string& ruleKey);
};
MAKE_REFLECT_STRUCT(SonarLintWorkspaceSettings, disableTelemetry, connectedMode,
- rules, output, pathToNodeExecutable)
+ rules, output, pathToNodeExecutable)
- DEFINE_REQUEST_RESPONSE_TYPE(slls_listAllRules, JsonNull, lsp::Any, "sonarlint/listAllRules");
+ DEFINE_REQUEST_RESPONSE_TYPE(slls_listAllRules, JsonNull, lsp::Any, "sonarlint/listAllRules");
@@ -173,4 +173,4 @@ DEFINE_REQUEST_RESPONSE_TYPE(slls_showRuleDescription, ShowRuleDescriptionParams
DEFINE_REQUEST_RESPONSE_TYPE(slls_getJavaConfig, lsDocumentUri, GetJavaConfigResponse, "sonarlint/getJavaConfig");
-DEFINE_NOTIFICATION_TYPE(slls_setTraceNotification, SetTraceNotificationParams, "$/setTraceNotification") \ No newline at end of file
+DEFINE_NOTIFICATION_TYPE(slls_setTraceNotification, SetTraceNotificationParams, "$/setTraceNotification")
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/InitializeParams.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/InitializeParams.h
index f10080ea21..c07cc8149d 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/InitializeParams.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/InitializeParams.h
@@ -6,10 +6,10 @@
#include "LibLsp/lsp/workspace/workspaceFolders.h"
struct ClientInfo {
- std::string name;
- boost::optional<std::string> version;
-
- MAKE_SWAP_METHOD(ClientInfo,name,version);
+ std::string name;
+ boost::optional<std::string> version;
+
+ MAKE_SWAP_METHOD(ClientInfo,name,version);
};
MAKE_REFLECT_STRUCT(ClientInfo,name,version);
@@ -19,7 +19,7 @@ struct lsInitializeParams {
// If the parent process is not alive then the server should exit (see exit
// notification) its process.
boost::optional<int> processId;
-
+
/**
* Information about the client
*
@@ -37,7 +37,7 @@ struct lsInitializeParams {
* @since 3.16.0
*/
boost::optional<std::string> locale;
-
+
// The rootPath of the workspace. Is null
// if no folder is open.
//
@@ -64,13 +64,13 @@ struct lsInitializeParams {
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').
@@ -117,9 +117,9 @@ struct lsInitializeError {
bool retry;
void swap(lsInitializeError& arg) noexcept
{
- auto tem = retry;
- retry = arg.retry;
- arg.retry = tem;
+ auto tem = retry;
+ retry = arg.retry;
+ arg.retry = tem;
}
};
MAKE_REFLECT_STRUCT(lsInitializeError, retry);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialize.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialize.h
index eb8810939a..2198b158bf 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialize.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialize.h
@@ -15,7 +15,7 @@
*/
struct InitializeResult {
lsServerCapabilities capabilities;
- MAKE_SWAP_METHOD(InitializeResult, capabilities);
+ MAKE_SWAP_METHOD(InitializeResult, capabilities);
};
MAKE_REFLECT_STRUCT(InitializeResult, capabilities);
@@ -26,7 +26,7 @@ MAKE_REFLECT_STRUCT(InitializeResult, capabilities);
* 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.
+ * - 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
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsClientCapabilities.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsClientCapabilities.h
index fcf6634e13..29129565e4 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsClientCapabilities.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsClientCapabilities.h
@@ -10,17 +10,17 @@
* @since 3.16.0
*/
struct MarkdownClientCapabilities {
- /**
- * The name of the parser.
- */
- std::string parser;
-
- /**
- * The version of the parser.
- */
- boost::optional<std::string> version;
- MAKE_SWAP_METHOD(MarkdownClientCapabilities, parser, version)
-
+ /**
+ * The name of the parser.
+ */
+ std::string parser;
+
+ /**
+ * The version of the parser.
+ */
+ boost::optional<std::string> version;
+ MAKE_SWAP_METHOD(MarkdownClientCapabilities, parser, version)
+
};
MAKE_REFLECT_STRUCT(MarkdownClientCapabilities, parser, version)
@@ -32,7 +32,7 @@ struct lsClientCapabilities {
boost::optional<lsTextDocumentClientCapabilities> textDocument;
/**
- * Window specific client capabilities.
+ * Window specific client capabilities.
*/
boost::optional<lsp::Any> window;
/**
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsServerCapabilities.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsServerCapabilities.h
index 66af2ced6b..d62d3e4dfd 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsServerCapabilities.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsServerCapabilities.h
@@ -16,77 +16,77 @@ extern void Reflect(Reader&, std::pair<boost::optional<lsTextDocumentSyncKind>,
// 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<CodeActionKind> codeActionKinds;
-
- MAKE_SWAP_METHOD(CodeActionOptions, workDoneProgress, codeActionKinds);
+ //
+ // 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<CodeActionKind> 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<bool> resolveProvider ;
- MAKE_SWAP_METHOD(CodeLensOptions, workDoneProgress, resolveProvider);
+ //
+ // Code lens has a resolve provider as well.
+ //
+ boost::optional<bool> 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<std::string> moreTriggerCharacter;
- MAKE_SWAP_METHOD(lsDocumentOnTypeFormattingOptions, workDoneProgress,
- firstTriggerCharacter,
- moreTriggerCharacter);
+ // A character on which formatting should be triggered, like `}`.
+ std::string firstTriggerCharacter;
+
+ // More trigger characters.
+ std::vector<std::string> moreTriggerCharacter;
+ MAKE_SWAP_METHOD(lsDocumentOnTypeFormattingOptions, workDoneProgress,
+ firstTriggerCharacter,
+ moreTriggerCharacter);
};
MAKE_REFLECT_STRUCT(lsDocumentOnTypeFormattingOptions, workDoneProgress,
- firstTriggerCharacter,
- moreTriggerCharacter);
+ firstTriggerCharacter,
+ moreTriggerCharacter);
struct RenameOptions : WorkDoneProgressOptions {
- //
- // Renames should be checked and tested before being executed.
- //
- boost::optional<bool> prepareProvider;
- MAKE_SWAP_METHOD(RenameOptions, workDoneProgress, prepareProvider);
+ //
+ // Renames should be checked and tested before being executed.
+ //
+ boost::optional<bool> prepareProvider;
+ MAKE_SWAP_METHOD(RenameOptions, workDoneProgress, prepareProvider);
};
MAKE_REFLECT_STRUCT(RenameOptions,workDoneProgress,prepareProvider)
struct DocumentFilter{
- //
- // A language id, like `typescript`.
- //
- boost::optional<std::string> language;
- //
- // A Uri [scheme](#Uri.scheme), like `file` or `untitled`.
- //
- boost::optional<std::string>scheme;
- //
- // 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::optional<std::string>pattern;
- MAKE_SWAP_METHOD(DocumentFilter, language, scheme, pattern)
+ //
+ // A language id, like `typescript`.
+ //
+ boost::optional<std::string> language;
+ //
+ // A Uri [scheme](#Uri.scheme), like `file` or `untitled`.
+ //
+ boost::optional<std::string>scheme;
+ //
+ // 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::optional<std::string>pattern;
+ MAKE_SWAP_METHOD(DocumentFilter, language, scheme, pattern)
};
MAKE_REFLECT_STRUCT(DocumentFilter, language, scheme, pattern)
@@ -95,17 +95,17 @@ using DocumentSelector = std::vector<DocumentFilter>;
// Document link options
struct lsDocumentLinkOptions :WorkDoneProgressOptions {
- // Document links have a resolve provider as well.
- boost::optional<bool> resolveProvider;
- MAKE_SWAP_METHOD(lsDocumentLinkOptions, workDoneProgress, resolveProvider);
+ // Document links have a resolve provider as well.
+ boost::optional<bool> 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<std::string> commands;
- MAKE_SWAP_METHOD(lsExecuteCommandOptions, workDoneProgress, commands);
+ // The commands to be executed on the server
+ std::vector<std::string> commands;
+ MAKE_SWAP_METHOD(lsExecuteCommandOptions, workDoneProgress, commands);
};
MAKE_REFLECT_STRUCT(lsExecuteCommandOptions, workDoneProgress, commands);
@@ -116,9 +116,9 @@ 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> documentSelector;
+ boost::optional<DocumentSelector> documentSelector;
- MAKE_SWAP_METHOD(TextDocumentRegistrationOptions, documentSelector);
+ MAKE_SWAP_METHOD(TextDocumentRegistrationOptions, documentSelector);
};
MAKE_REFLECT_STRUCT(TextDocumentRegistrationOptions, documentSelector);
@@ -127,12 +127,12 @@ MAKE_REFLECT_STRUCT(TextDocumentRegistrationOptions, documentSelector);
//
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<std::string> id;
- MAKE_SWAP_METHOD(StaticRegistrationOptions, documentSelector, id)
+ //
+ // The id used to register the request. The id can be used to deregister
+ // the request again. See also Registration#id.
+ //
+ boost::optional<std::string> id;
+ MAKE_SWAP_METHOD(StaticRegistrationOptions, documentSelector, id)
};
MAKE_REFLECT_STRUCT(StaticRegistrationOptions, documentSelector,id)
@@ -143,22 +143,22 @@ MAKE_REFLECT_STRUCT(StaticRegistrationOptions, documentSelector,id)
//
struct WorkspaceFoldersOptions {
- //
- // The server has support for workspace folders
- //
- boost::optional<bool> 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<std::pair< boost::optional<std::string>, boost::optional<bool> > > changeNotifications;
- MAKE_SWAP_METHOD(WorkspaceFoldersOptions, supported, changeNotifications);
+ //
+ // The server has support for workspace folders
+ //
+ boost::optional<bool> 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<std::pair< boost::optional<std::string>, boost::optional<bool> > > changeNotifications;
+ MAKE_SWAP_METHOD(WorkspaceFoldersOptions, supported, changeNotifications);
};
MAKE_REFLECT_STRUCT(WorkspaceFoldersOptions, supported, changeNotifications);
@@ -170,8 +170,8 @@ MAKE_REFLECT_STRUCT(WorkspaceFoldersOptions, supported, changeNotifications);
//
enum lsFileOperationPatternKind
{
- file,
- folder
+ file,
+ folder
};
MAKE_REFLECT_TYPE_PROXY(lsFileOperationPatternKind)
@@ -182,11 +182,11 @@ MAKE_REFLECT_TYPE_PROXY(lsFileOperationPatternKind)
//
struct lsFileOperationPatternOptions {
- //
- // The pattern should be matched ignoring casing.
- //
- boost::optional<bool> ignoreCase;
- MAKE_SWAP_METHOD(lsFileOperationPatternOptions, ignoreCase)
+ //
+ // The pattern should be matched ignoring casing.
+ //
+ boost::optional<bool> ignoreCase;
+ MAKE_SWAP_METHOD(lsFileOperationPatternOptions, ignoreCase)
};
MAKE_REFLECT_STRUCT(lsFileOperationPatternOptions, ignoreCase)
//
@@ -196,33 +196,33 @@ MAKE_REFLECT_STRUCT(lsFileOperationPatternOptions, ignoreCase)
// @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<lsFileOperationPatternKind> matches;
-
- //
- // Additional options used during matching.
- //
- boost::optional<lsFileOperationPatternOptions> options ;
- MAKE_SWAP_METHOD(lsFileOperationPattern, glob, matches, options)
+ //
+ // 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<lsFileOperationPatternKind> matches;
+
+ //
+ // Additional options used during matching.
+ //
+ boost::optional<lsFileOperationPatternOptions> options ;
+ MAKE_SWAP_METHOD(lsFileOperationPattern, glob, matches, options)
};
MAKE_REFLECT_STRUCT(lsFileOperationPattern, glob, matches, options)
//
@@ -233,16 +233,16 @@ MAKE_REFLECT_STRUCT(lsFileOperationPattern, glob, matches, options)
//
struct lsFileOperationFilter {
- //
- // A Uri like `file` or `untitled`.
- //
- boost::optional<std::string> scheme;
+ //
+ // A Uri like `file` or `untitled`.
+ //
+ boost::optional<std::string> scheme;
- //
- // The actual file operation pattern.
- //
- boost::optional<lsFileOperationPattern> pattern;
- MAKE_SWAP_METHOD(lsFileOperationFilter, scheme, pattern)
+ //
+ // The actual file operation pattern.
+ //
+ boost::optional<lsFileOperationPattern> pattern;
+ MAKE_SWAP_METHOD(lsFileOperationFilter, scheme, pattern)
};
MAKE_REFLECT_STRUCT(lsFileOperationFilter, scheme, pattern)
//
@@ -251,69 +251,69 @@ MAKE_REFLECT_STRUCT(lsFileOperationFilter, scheme, pattern)
// @since 3.16.0
//
struct lsFileOperationRegistrationOptions {
- //
- // The actual filters.
- //
- boost::optional<std::vector<lsFileOperationFilter>> filters;
- MAKE_SWAP_METHOD(lsFileOperationRegistrationOptions, filters)
+ //
+ // The actual filters.
+ //
+ boost::optional<std::vector<lsFileOperationFilter>> 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<lsFileOperationRegistrationOptions> didCreate;
-
- //
- // The server is interested in receiving willCreateFiles requests.
- //
- boost::optional<lsFileOperationRegistrationOptions> willCreate;
-
- //
- // The server is interested in receiving didRenameFiles
- // notifications.
- //
- boost::optional<lsFileOperationRegistrationOptions> didRename;
-
- //
- // The server is interested in receiving willRenameFiles requests.
- //
- boost::optional<lsFileOperationRegistrationOptions> willRename;
-
- //
- // The server is interested in receiving didDeleteFiles file
- // notifications.
- //
- boost::optional<lsFileOperationRegistrationOptions> didDelete;
-
- //
- // The server is interested in receiving willDeleteFiles file
- // requests.
- //
- boost::optional<lsFileOperationRegistrationOptions> willDelete;
- MAKE_SWAP_METHOD(lsFileOperations, didCreate, willCreate, didRename, willRename, didDelete, willDelete)
- };
- boost::optional<lsFileOperations>fileOperations;
-
-
- MAKE_SWAP_METHOD(WorkspaceServerCapabilities, workspaceFolders, fileOperations)
+ //
+ // 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<lsFileOperationRegistrationOptions> didCreate;
+
+ //
+ // The server is interested in receiving willCreateFiles requests.
+ //
+ boost::optional<lsFileOperationRegistrationOptions> willCreate;
+
+ //
+ // The server is interested in receiving didRenameFiles
+ // notifications.
+ //
+ boost::optional<lsFileOperationRegistrationOptions> didRename;
+
+ //
+ // The server is interested in receiving willRenameFiles requests.
+ //
+ boost::optional<lsFileOperationRegistrationOptions> willRename;
+
+ //
+ // The server is interested in receiving didDeleteFiles file
+ // notifications.
+ //
+ boost::optional<lsFileOperationRegistrationOptions> didDelete;
+
+ //
+ // The server is interested in receiving willDeleteFiles file
+ // requests.
+ //
+ boost::optional<lsFileOperationRegistrationOptions> willDelete;
+ MAKE_SWAP_METHOD(lsFileOperations, didCreate, willCreate, didRename, willRename, didDelete, willDelete)
+ };
+ boost::optional<lsFileOperations>fileOperations;
+
+
+ MAKE_SWAP_METHOD(WorkspaceServerCapabilities, workspaceFolders, fileOperations)
};
MAKE_REFLECT_STRUCT(WorkspaceServerCapabilities, workspaceFolders, fileOperations)
MAKE_REFLECT_STRUCT(WorkspaceServerCapabilities::lsFileOperations, didCreate, willCreate, didRename, willRename, didDelete, willDelete)
@@ -328,77 +328,77 @@ MAKE_REFLECT_STRUCT(WorkspaceServerCapabilities::lsFileOperations, didCreate, wi
//
struct SemanticHighlightingServerCapabilities {
- //
- // A "lookup table" of semantic highlighting <a href="https://manual.macromates.com/en/language_grammars">TextMate scopes</a>
- // 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<std::string> > scopes;
- MAKE_SWAP_METHOD(SemanticHighlightingServerCapabilities, scopes)
+ //
+ // A "lookup table" of semantic highlighting <a href="https://manual.macromates.com/en/language_grammars">TextMate scopes</a>
+ // 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<std::string> > 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)
+ //
+ // 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<bool>, boost::optional<lsp::Any> > > range;
-
- //
- // Server supports providing semantic tokens for a full document.
- //
- boost::optional< std::pair< boost::optional<bool>,
- boost::optional<SemanticTokensServerFull> > > 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<DocumentFilter> > documentSelector;
- //
- // The id used to register the request. The id can be used to deregister
- // the request again. See also Registration#id.
- //
- boost::optional<std::string> id;
- MAKE_SWAP_METHOD(SemanticTokensWithRegistrationOptions, legend, range, full, documentSelector, id)
+ SemanticTokensLegend legend;
+
+ //
+ // Server supports providing semantic tokens for a specific range
+ // of a document.
+ //
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<lsp::Any> > > range;
+
+ //
+ // Server supports providing semantic tokens for a full document.
+ //
+ boost::optional< std::pair< boost::optional<bool>,
+ boost::optional<SemanticTokensServerFull> > > 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<DocumentFilter> > documentSelector;
+ //
+ // The id used to register the request. The id can be used to deregister
+ // the request again. See also Registration#id.
+ //
+ boost::optional<std::string> 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
+ // 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<lsTextDocumentSyncKind>,
- boost::optional<lsTextDocumentSyncOptions> >> textDocumentSync;
+ // TextDocumentSyncKind number.
+ boost::optional< std::pair<boost::optional<lsTextDocumentSyncKind>,
+ boost::optional<lsTextDocumentSyncOptions> >> textDocumentSync;
- // The server provides hover support.
- boost::optional<bool> hoverProvider;
+ // The server provides hover support.
+ boost::optional<bool> hoverProvider;
- // The server provides completion support.
- boost::optional < lsCompletionOptions > completionProvider;
+ // The server provides completion support.
+ boost::optional < lsCompletionOptions > completionProvider;
- // The server provides signature help support.
- boost::optional < lsSignatureHelpOptions > signatureHelpProvider;
+ // The server provides signature help support.
+ boost::optional < lsSignatureHelpOptions > signatureHelpProvider;
- // The server provides goto definition support.
- boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > definitionProvider;
+ // The server provides goto definition support.
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > definitionProvider;
//
@@ -406,184 +406,184 @@ struct lsServerCapabilities {
//
// Since 3.6.0
//
- boost::optional< std::pair< boost::optional<bool>, boost::optional<StaticRegistrationOptions> > > typeDefinitionProvider ;
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<StaticRegistrationOptions> > > typeDefinitionProvider ;
- // The server provides implementation support.
- boost::optional< std::pair< boost::optional<bool>, boost::optional<StaticRegistrationOptions> > > implementationProvider ;
+ // The server provides implementation support.
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<StaticRegistrationOptions> > > implementationProvider ;
- // The server provides find references support.
- boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > referencesProvider ;
+ // The server provides find references support.
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > referencesProvider ;
- // The server provides document highlight support.
- boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > documentHighlightProvider ;
+ // The server provides document highlight support.
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > documentHighlightProvider ;
- // The server provides document symbol support.
- boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > documentSymbolProvider ;
+ // The server provides document symbol support.
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > documentSymbolProvider ;
- // The server provides workspace symbol support.
- boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > workspaceSymbolProvider ;
+ // The server provides workspace symbol support.
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > workspaceSymbolProvider ;
- // The server provides code actions.
- boost::optional< std::pair< boost::optional<bool>, boost::optional<CodeActionOptions> > > codeActionProvider ;
+ // The server provides code actions.
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<CodeActionOptions> > > codeActionProvider ;
- // The server provides code lens.
- boost::optional<CodeLensOptions> codeLensProvider;
+ // The server provides code lens.
+ boost::optional<CodeLensOptions> codeLensProvider;
- // The server provides document formatting.
- boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > documentFormattingProvider ;
+ // The server provides document formatting.
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > documentFormattingProvider ;
- // The server provides document range formatting.
- boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > documentRangeFormattingProvider ;
+ // The server provides document range formatting.
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<WorkDoneProgressOptions> > > documentRangeFormattingProvider ;
- // The server provides document formatting on typing.
- boost::optional<lsDocumentOnTypeFormattingOptions> documentOnTypeFormattingProvider;
+ // The server provides document formatting on typing.
+ boost::optional<lsDocumentOnTypeFormattingOptions> documentOnTypeFormattingProvider;
- // The server provides rename support.
- boost::optional< std::pair< boost::optional<bool>, boost::optional<RenameOptions> > > renameProvider;
+ // The server provides rename support.
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<RenameOptions> > > renameProvider;
- // The server provides document link support.
- boost::optional<lsDocumentLinkOptions > documentLinkProvider;
+ // The server provides document link support.
+ boost::optional<lsDocumentLinkOptions > documentLinkProvider;
-
- //
- // The server provides color provider support.
- //
- // @since 3.6.0
- //
- boost::optional< std::pair< boost::optional<bool>, boost::optional<DocumentColorOptions> > > colorProvider;
-
-
- //
- // The server provides folding provider support.
- //
- // @since 3.10.0
- //
- boost::optional < std::pair< boost::optional<bool>, boost::optional<FoldingRangeOptions> > > 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}.
- //
- // <p>
- // <b>Note:</b> the <a href=
- // "https://github.com/Microsoft/vscode-languageserver-node/pull/426">{@code textDocument/typeHierarchy}
- // language feature</a> is not yet part of the official LSP specification.
- //
-
- boost::optional< std::pair< boost::optional<bool>,
- boost::optional<StaticRegistrationOptions> > > typeHierarchyProvider;
-
- //
- // The server provides Call Hierarchy support.
- //
-
- boost::optional< std::pair< boost::optional<bool>,
- boost::optional<StaticRegistrationOptions> > > callHierarchyProvider;
-
- //
- // The server provides selection range support.
- //
- // Since 3.15.0
- //
- boost::optional< std::pair< boost::optional<bool>,
- boost::optional<StaticRegistrationOptions> > > selectionRangeProvider;
-
- //
- // The server provides linked editing range support.
- //
- // Since 3.16.0
- //
- boost::optional< std::pair< boost::optional<bool>,
- boost::optional<StaticRegistrationOptions> > > 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<bool>,
- boost::optional<StaticRegistrationOptions> > > monikerProvider;
-
- boost::optional<lsp::Any> 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)
+
+ //
+ // The server provides color provider support.
+ //
+ // @since 3.6.0
+ //
+ boost::optional< std::pair< boost::optional<bool>, boost::optional<DocumentColorOptions> > > colorProvider;
+
+
+ //
+ // The server provides folding provider support.
+ //
+ // @since 3.10.0
+ //
+ boost::optional < std::pair< boost::optional<bool>, boost::optional<FoldingRangeOptions> > > 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}.
+ //
+ // <p>
+ // <b>Note:</b> the <a href=
+ // "https://github.com/Microsoft/vscode-languageserver-node/pull/426">{@code textDocument/typeHierarchy}
+ // language feature</a> is not yet part of the official LSP specification.
+ //
+
+ boost::optional< std::pair< boost::optional<bool>,
+ boost::optional<StaticRegistrationOptions> > > typeHierarchyProvider;
+
+ //
+ // The server provides Call Hierarchy support.
+ //
+
+ boost::optional< std::pair< boost::optional<bool>,
+ boost::optional<StaticRegistrationOptions> > > callHierarchyProvider;
+
+ //
+ // The server provides selection range support.
+ //
+ // Since 3.15.0
+ //
+ boost::optional< std::pair< boost::optional<bool>,
+ boost::optional<StaticRegistrationOptions> > > selectionRangeProvider;
+
+ //
+ // The server provides linked editing range support.
+ //
+ // Since 3.16.0
+ //
+ boost::optional< std::pair< boost::optional<bool>,
+ boost::optional<StaticRegistrationOptions> > > 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<bool>,
+ boost::optional<StaticRegistrationOptions> > > monikerProvider;
+
+ boost::optional<lsp::Any> 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)
+ 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
index 569f203c7a..4e66bcb7ae 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h
@@ -14,8 +14,8 @@
struct WorkDoneProgressOptions
{
- boost::optional<bool>workDoneProgress;
- MAKE_SWAP_METHOD(WorkDoneProgressOptions, workDoneProgress);
+ boost::optional<bool>workDoneProgress;
+ MAKE_SWAP_METHOD(WorkDoneProgressOptions, workDoneProgress);
};
MAKE_REFLECT_STRUCT(WorkDoneProgressOptions, workDoneProgress);
@@ -58,9 +58,9 @@ struct lsSaveOptions {
bool includeText = false;
void swap(lsSaveOptions& arg)noexcept
{
- auto temp = includeText;
- includeText = arg.includeText;
- arg.includeText = temp;
+ auto temp = includeText;
+ includeText = arg.includeText;
+ arg.includeText = temp;
}
};
MAKE_REFLECT_STRUCT(lsSaveOptions, includeText);
@@ -114,11 +114,11 @@ struct lsTextDocumentSyncOptions {
boost::optional<lsSaveOptions> save;
MAKE_SWAP_METHOD(lsTextDocumentSyncOptions,
- openClose,
- change,
- willSave,
- willSaveWaitUntil,
- save);
+ openClose,
+ change,
+ willSave,
+ willSaveWaitUntil,
+ save);
};
MAKE_REFLECT_STRUCT(lsTextDocumentSyncOptions,
openClose,
@@ -128,402 +128,402 @@ MAKE_REFLECT_STRUCT(lsTextDocumentSyncOptions,
save);
struct SynchronizationCapabilities {
- // Whether text document synchronization supports dynamic registration.
- boost::optional<bool> dynamicRegistration;
+ // Whether text document synchronization supports dynamic registration.
+ boost::optional<bool> dynamicRegistration;
- // The client supports sending will save notifications.
- boost::optional<bool> willSave;
+ // The client supports sending will save notifications.
+ boost::optional<bool> 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<bool> willSaveWaitUntil;
+ // 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<bool> willSaveWaitUntil;
- // The client supports did save notifications.
- boost::optional<bool> didSave;
+ // The client supports did save notifications.
+ boost::optional<bool> didSave;
- MAKE_SWAP_METHOD(SynchronizationCapabilities,
- dynamicRegistration,
- willSave,
- willSaveWaitUntil,
- didSave);
+ MAKE_SWAP_METHOD(SynchronizationCapabilities,
+ dynamicRegistration,
+ willSave,
+ willSaveWaitUntil,
+ didSave);
};
MAKE_REFLECT_STRUCT(SynchronizationCapabilities,
- dynamicRegistration,
- willSave,
- willSaveWaitUntil,
- didSave);
+ dynamicRegistration,
+ willSave,
+ willSaveWaitUntil,
+ didSave);
struct CompletionItemKindCapabilities
{
- boost::optional<std::vector<lsCompletionItemKind> >valueSet;
- MAKE_SWAP_METHOD(CompletionItemKindCapabilities, valueSet);
+ boost::optional<std::vector<lsCompletionItemKind> >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<bool> snippetSupport;
+ // 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<bool> snippetSupport;
// Client supports commit characters on a completion item.
- boost::optional<bool> commitCharactersSupport;
+ boost::optional<bool> commitCharactersSupport;
// Client supports the following content formats for the documentation
// property. The order describes the preferred format of the client.
- boost::optional< std::vector<std::string> > documentationFormat;
+ boost::optional< std::vector<std::string> > documentationFormat;
// Client supports the deprecated property on a completion item.
- boost::optional<bool> deprecatedSupport;
+ boost::optional<bool> deprecatedSupport;
- //
- // Client supports the preselect property on a completion item.
- //
- boost::optional<bool> preselectSupport;
+ //
+ // Client supports the preselect property on a completion item.
+ //
+ boost::optional<bool> preselectSupport;
- MAKE_SWAP_METHOD(CompletionItemCapabilities,
- snippetSupport,
- commitCharactersSupport,
- documentationFormat,
- deprecatedSupport, preselectSupport);
+ MAKE_SWAP_METHOD(CompletionItemCapabilities,
+ snippetSupport,
+ commitCharactersSupport,
+ documentationFormat,
+ deprecatedSupport, preselectSupport);
};
MAKE_REFLECT_STRUCT(CompletionItemCapabilities,
- snippetSupport,
- commitCharactersSupport,
- documentationFormat,
- deprecatedSupport, preselectSupport);
+ snippetSupport,
+ commitCharactersSupport,
+ documentationFormat,
+ deprecatedSupport, preselectSupport);
//
// Capabilities specific to the `textDocument/completion`
//
struct CompletionCapabilities {
- // Whether completion supports dynamic registration.
- boost::optional<bool> dynamicRegistration;
+ // Whether completion supports dynamic registration.
+ boost::optional<bool> dynamicRegistration;
- // The client supports the following `CompletionItem` specific
- // capabilities.
- boost::optional<CompletionItemCapabilities> completionItem;
+ // The client supports the following `CompletionItem` specific
+ // capabilities.
+ boost::optional<CompletionItemCapabilities> completionItem;
- //
- // The client supports the following `CompletionItemKind` specific
- // capabilities.
- //
- boost::optional<CompletionItemKindCapabilities> completionItemKind;
+ //
+ // The client supports the following `CompletionItemKind` specific
+ // capabilities.
+ //
+ boost::optional<CompletionItemKindCapabilities> completionItemKind;
- //
- // The client supports sending additional context information for a
- // `textDocument/completion` request.
- //
- boost::optional<bool> contextSupport;
+ //
+ // The client supports sending additional context information for a
+ // `textDocument/completion` request.
+ //
+ boost::optional<bool> contextSupport;
- MAKE_SWAP_METHOD(CompletionCapabilities,
- dynamicRegistration,
- completionItem, completionItemKind);
+ MAKE_SWAP_METHOD(CompletionCapabilities,
+ dynamicRegistration,
+ completionItem, completionItemKind);
};
MAKE_REFLECT_STRUCT(CompletionCapabilities,
- dynamicRegistration,
- completionItem , completionItemKind);
+ 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<std::vector<std::string>> contentFormat;
+ boost::optional<std::vector<std::string>> contentFormat;
- MAKE_SWAP_METHOD(HoverCapabilities, dynamicRegistration, 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<bool> labelOffsetSupport;
-
- MAKE_SWAP_METHOD(ParameterInformationCapabilities, labelOffsetSupport);
+struct ParameterInformationCapabilities {
+ //
+ // The client supports processing label offsets instead of a
+ // simple label string.
+ //
+ // Since 3.14.0
+ //
+ boost::optional<bool> 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<std::string> documentationFormat;
-
- //
- // Client capabilities specific to parameter information.
- //
- ParameterInformationCapabilities parameterInformation;
-
- MAKE_SWAP_METHOD(SignatureInformationCapabilities, documentationFormat, parameterInformation)
+ //
+ // 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<std::string> 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;
+ //
+ // The client supports the following `SignatureInformation`
+ // specific properties.
+ //
+ boost::optional< SignatureInformationCapabilities > signatureInformation;
- MAKE_SWAP_METHOD(SignatureHelpCapabilities, dynamicRegistration, signatureInformation)
+ MAKE_SWAP_METHOD(SignatureHelpCapabilities, dynamicRegistration, signatureInformation)
};
MAKE_REFLECT_STRUCT(SignatureHelpCapabilities, dynamicRegistration, signatureInformation)
struct DocumentSymbolCapabilities :public DynamicRegistrationCapabilities {
- //
- // Specific capabilities for the `SymbolKind`.
- //
- boost::optional<SymbolKindCapabilities> symbolKind;
+ //
+ // Specific capabilities for the `SymbolKind`.
+ //
+ boost::optional<SymbolKindCapabilities> symbolKind;
- //
- // The client support hierarchical document symbols.
- //
- boost::optional<bool> hierarchicalDocumentSymbolSupport;
+ //
+ // The client support hierarchical document symbols.
+ //
+ boost::optional<bool> hierarchicalDocumentSymbolSupport;
- MAKE_SWAP_METHOD(DocumentSymbolCapabilities, dynamicRegistration, symbolKind, 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::optional<bool>linkSupport;
+ //
+ // The client supports additional metadata in the form of declaration links.
+ //
+ boost::optional<bool>linkSupport;
- MAKE_SWAP_METHOD(DeclarationCapabilities, dynamicRegistration, linkSupport);
+ 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)
+ //
+ // 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<CodeActionKindCapabilities> codeActionKind;
+ boost::optional<CodeActionKindCapabilities> codeActionKind;
- MAKE_SWAP_METHOD(CodeActionLiteralSupportCapabilities, 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<CodeActionLiteralSupportCapabilities> codeActionLiteralSupport;
+ boost::optional<CodeActionLiteralSupportCapabilities> codeActionLiteralSupport;
- MAKE_SWAP_METHOD(CodeActionCapabilities, dynamicRegistration, 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<bool> prepareSupport;
+ boost::optional<bool> prepareSupport;
- MAKE_SWAP_METHOD(RenameCapabilities, dynamicRegistration, prepareSupport)
+ MAKE_SWAP_METHOD(RenameCapabilities, dynamicRegistration, prepareSupport)
};
MAKE_REFLECT_STRUCT(RenameCapabilities, dynamicRegistration, prepareSupport)
struct DiagnosticsTagSupport {
- /**
- * The tags supported by the client.
- */
- std::vector<DiagnosticTag> valueSet;
- MAKE_SWAP_METHOD(DiagnosticsTagSupport, valueSet)
+ /**
+ * The tags supported by the client.
+ */
+ std::vector<DiagnosticTag> 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<bool> 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<bool>, boost::optional<DiagnosticsTagSupport> > > tagSupport;
-
- /**
- * Whether the client interprets the version property of the
- * `textDocument/publishDiagnostics` notification's parameter.
- *
- * Since 3.15.0
- */
- boost::optional<bool> versionSupport;
-
- /**
+ boost::optional<bool> 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<bool>, boost::optional<DiagnosticsTagSupport> > > tagSupport;
+
+ /**
+ * Whether the client interprets the version property of the
+ * `textDocument/publishDiagnostics` notification's parameter.
+ *
+ * Since 3.15.0
+ */
+ boost::optional<bool> versionSupport;
+
+ /**
* Client supports a codeDescription property
*
* @since 3.16.0
*/
- boost::optional<bool> codeDescriptionSupport ;
+ boost::optional<bool> 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<bool> dataSupport ;
+ /**
+ * Whether code action supports the `data` property which is
+ * preserved between a `textDocument/publishDiagnostics` and
+ * `textDocument/codeAction` request.
+ *
+ * @since 3.16.0
+ */
+ boost::optional<bool> dataSupport ;
- MAKE_SWAP_METHOD(PublishDiagnosticsClientCapabilities, dynamicRegistration, relatedInformation, tagSupport,versionSupport,codeDescriptionSupport,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<int> 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<bool> lineFoldingOnly;
- MAKE_SWAP_METHOD(FoldingRangeCapabilities, dynamicRegistration, rangeLimit, lineFoldingOnly)
+ //
+ // 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<int> 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<bool> 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<bool> semanticHighlighting;
+ boost::optional<bool> semanticHighlighting;
- MAKE_SWAP_METHOD(SemanticHighlightingCapabilities, dynamicRegistration, 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)
+ //
+ // 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<std::pair< boost::optional<bool>,
- boost::optional<SemanticTokensClientCapabilitiesRequestsFull>>> range;
- //
- // The client will send the `textDocument/semanticTokens/full` request
- // if the server provides a corresponding handler.
- //
- boost::optional<std::pair< boost::optional<bool>, boost::optional<lsp::Any>>> full;
- MAKE_SWAP_METHOD(lsRequests, range, full)
- };
-
- lsRequests requests;
- //
- // The token types that the client supports.
- //
- std::vector<std::string> tokenTypes;
-
- //
- // The token modifiers that the client supports.
- //
- std::vector<std::string> tokenModifiers;
- //
- // The formats the clients supports.
- //
- std::vector<std::string> 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)
+ //export TokenFormat = 'relative';
+ struct lsRequests
+ {
+ //
+ // The client will send the `textDocument/semanticTokens/range` request
+ // if the server provides a corresponding handler.
+ //
+ boost::optional<std::pair< boost::optional<bool>,
+ boost::optional<SemanticTokensClientCapabilitiesRequestsFull>>> range;
+ //
+ // The client will send the `textDocument/semanticTokens/full` request
+ // if the server provides a corresponding handler.
+ //
+ boost::optional<std::pair< boost::optional<bool>, boost::optional<lsp::Any>>> full;
+ MAKE_SWAP_METHOD(lsRequests, range, full)
+ };
+
+ lsRequests requests;
+ //
+ // The token types that the client supports.
+ //
+ std::vector<std::string> tokenTypes;
+
+ //
+ // The token modifiers that the client supports.
+ //
+ std::vector<std::string> tokenModifiers;
+ //
+ // The formats the clients supports.
+ //
+ std::vector<std::string> 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)
+ formats, overlappingTokenSupport, multilineTokenSupport)
// Text document specific client capabilities.
struct lsTextDocumentClientCapabilities {
- SynchronizationCapabilities synchronization;
+ SynchronizationCapabilities synchronization;
// Capabilities specific to the `textDocument/completion`
@@ -641,10 +641,10 @@ struct lsTextDocumentClientCapabilities {
boost::optional< DynamicRegistrationCapabilities > selectionRange;
//
- // Capabilities specific to the `textDocument/linkedEditingRange` request.
- //
- // @since 3.16.0
- //
+ // Capabilities specific to the `textDocument/linkedEditingRange` request.
+ //
+ // @since 3.16.0
+ //
boost::optional< DynamicRegistrationCapabilities > linkedEditingRange;
//
@@ -669,45 +669,45 @@ struct lsTextDocumentClientCapabilities {
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)
+ 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)
+ 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
index dd37a1af2f..ee672aa111 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h
@@ -21,90 +21,90 @@
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<bool> groupsOnLabel;
- MAKE_SWAP_METHOD(lschangeAnnotationSupport, groupsOnLabel)
+ /**
+ * 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<bool> groupsOnLabel;
+ MAKE_SWAP_METHOD(lschangeAnnotationSupport, groupsOnLabel)
};
MAKE_REFLECT_STRUCT(lschangeAnnotationSupport, groupsOnLabel)
struct WorkspaceEditCapabilities {
- /**
- * The client supports versioned document changes in `WorkspaceEdit`s
- */
- boost::optional<bool> documentChanges;
-
- /**
- * The client supports resource changes
- * in `WorkspaceEdit`s.
- *
- * @deprecated Since LSP introduces resource operations, use {link #resourceOperations}
- */
-
- boost::optional<bool> 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<std::string> > resourceOperations;
-
- /**
- * The failure handling strategy of a client if applying the workspace edit
- * fails.
- *
- * See {@link FailureHandlingKind} for allowed values.
- */
- boost::optional<std::string > 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<bool> 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<lschangeAnnotationSupport> changeAnnotationSupport;
-
- MAKE_SWAP_METHOD(WorkspaceEditCapabilities, documentChanges, resourceChanges, resourceOperations, failureHandling, normalizesLineEndings, changeAnnotationSupport)
+ /**
+ * The client supports versioned document changes in `WorkspaceEdit`s
+ */
+ boost::optional<bool> documentChanges;
+
+ /**
+ * The client supports resource changes
+ * in `WorkspaceEdit`s.
+ *
+ * @deprecated Since LSP introduces resource operations, use {link #resourceOperations}
+ */
+
+ boost::optional<bool> 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<std::string> > resourceOperations;
+
+ /**
+ * The failure handling strategy of a client if applying the workspace edit
+ * fails.
+ *
+ * See {@link FailureHandlingKind} for allowed values.
+ */
+ boost::optional<std::string > 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<bool> 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<lschangeAnnotationSupport> 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<bool> dynamicRegistration;
+ // Did foo notification supports dynamic registration.
+ boost::optional<bool> dynamicRegistration;
- MAKE_SWAP_METHOD(DynamicRegistrationCapabilities,
- dynamicRegistration);
+ MAKE_SWAP_METHOD(DynamicRegistrationCapabilities,
+ dynamicRegistration);
};
MAKE_REFLECT_STRUCT(DynamicRegistrationCapabilities,
- dynamicRegistration);
+ dynamicRegistration);
// Workspace specific client capabilities.
struct SymbolKindCapabilities
{
- boost::optional< std::vector<lsSymbolKind> > valueSet;
+ boost::optional< std::vector<lsSymbolKind> > valueSet;
- MAKE_SWAP_METHOD(SymbolKindCapabilities, valueSet)
+ MAKE_SWAP_METHOD(SymbolKindCapabilities, valueSet)
};
@@ -114,66 +114,66 @@ MAKE_REFLECT_STRUCT(SymbolKindCapabilities, valueSet)
struct SymbolCapabilities :public DynamicRegistrationCapabilities {
- /**
- * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
- */
- boost::optional<SymbolKindCapabilities> symbolKind;
+ /**
+ * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
+ */
+ boost::optional<SymbolKindCapabilities> symbolKind;
- MAKE_SWAP_METHOD(SymbolCapabilities,
- symbolKind, dynamicRegistration)
+ MAKE_SWAP_METHOD(SymbolCapabilities,
+ symbolKind, dynamicRegistration)
};
MAKE_REFLECT_STRUCT(SymbolCapabilities,
- symbolKind, dynamicRegistration)
+ symbolKind, dynamicRegistration)
struct lsFileOperations
{
- /**
+ /**
* Whether the client supports dynamic registration for file
* requests/notifications.
*/
- boost::optional<bool> dynamicRegistration ;
-
- /**
- * The client has support for sending didCreateFiles notifications.
- */
- boost::optional<bool>didCreate ;
-
- /**
- * The client has support for sending willCreateFiles requests.
- */
- boost::optional<bool>willCreate ;
-
- /**
- * The client has support for sending didRenameFiles notifications.
- */
- boost::optional<bool>didRename ;
-
- /**
- * The client has support for sending willRenameFiles requests.
- */
- boost::optional<bool>willRename ;
-
- /**
- * The client has support for sending didDeleteFiles notifications.
- */
- boost::optional<bool>didDelete ;
-
- /**
- * The client has support for sending willDeleteFiles requests.
- */
- boost::optional<bool> willDelete ;
- MAKE_SWAP_METHOD(lsFileOperations, dynamicRegistration, didCreate, willCreate,
- didRename, willRename, didDelete, willDelete)
+ boost::optional<bool> dynamicRegistration ;
+
+ /**
+ * The client has support for sending didCreateFiles notifications.
+ */
+ boost::optional<bool>didCreate ;
+
+ /**
+ * The client has support for sending willCreateFiles requests.
+ */
+ boost::optional<bool>willCreate ;
+
+ /**
+ * The client has support for sending didRenameFiles notifications.
+ */
+ boost::optional<bool>didRename ;
+
+ /**
+ * The client has support for sending willRenameFiles requests.
+ */
+ boost::optional<bool>willRename ;
+
+ /**
+ * The client has support for sending didDeleteFiles notifications.
+ */
+ boost::optional<bool>didDelete ;
+
+ /**
+ * The client has support for sending willDeleteFiles requests.
+ */
+ boost::optional<bool> willDelete ;
+ MAKE_SWAP_METHOD(lsFileOperations, dynamicRegistration, didCreate, willCreate,
+ didRename, willRename, didDelete, willDelete)
};
MAKE_REFLECT_STRUCT(lsFileOperations, dynamicRegistration, didCreate, willCreate,
- didRename, willRename, didDelete, willDelete)
+ didRename, willRename, didDelete, willDelete)
struct lsWorkspaceClientCapabilites {
// The client supports applying batch edits to the workspace.
boost::optional<bool> applyEdit;
-
+
// Capabilities specific to `WorkspaceEdit`s
boost::optional<WorkspaceEditCapabilities> workspaceEdit;
@@ -211,11 +211,11 @@ struct lsWorkspaceClientCapabilites {
/**
- * Capabilities specific to the semantic token requests scoped to the
- * workspace.
- *
- * @since 3.16.0
- */
+ * Capabilities specific to the semantic token requests scoped to the
+ * workspace.
+ *
+ * @since 3.16.0
+ */
boost::optional<DynamicRegistrationCapabilities> semanticTokens ;
/**
@@ -232,14 +232,14 @@ struct lsWorkspaceClientCapabilites {
* @since 3.16.0
*/
boost::optional<lsFileOperations> fileOperations;
-
+
MAKE_SWAP_METHOD(lsWorkspaceClientCapabilites,
- applyEdit,
- workspaceEdit,
- didChangeConfiguration,
- didChangeWatchedFiles,
- symbol,executeCommand, workspaceFolders,
- configuration, semanticTokens, codeLens, fileOperations)
+ applyEdit,
+ workspaceEdit,
+ didChangeConfiguration,
+ didChangeWatchedFiles,
+ symbol,executeCommand, workspaceFolders,
+ configuration, semanticTokens, codeLens, fileOperations)
};
MAKE_REFLECT_STRUCT(lsWorkspaceClientCapabilites,
@@ -249,7 +249,7 @@ MAKE_REFLECT_STRUCT(lsWorkspaceClientCapabilites,
didChangeWatchedFiles,
symbol,
executeCommand,workspaceFolders,
- configuration, semanticTokens, codeLens, fileOperations)
+ 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
index 01cb18d68d..bf70d58842 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/progress.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/progress.h
@@ -8,9 +8,9 @@
//and partial result progress to support streaming of results.
struct ProgressParams
{
- std::pair<boost::optional<std::string> , boost::optional<int> > token;
- lsp::Any value;
- MAKE_SWAP_METHOD(ProgressParams, token, value)
+ std::pair<boost::optional<std::string> , boost::optional<int> > 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/language/language.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/language/language.h
index b4c7829e95..3f64946972 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/language/language.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/language/language.h
@@ -11,27 +11,27 @@
#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);
+
+ 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);
@@ -44,25 +44,25 @@ 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)
+ /**
+ * 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);
@@ -70,36 +70,36 @@ MAKE_REFLECT_TYPE_PROXY(MessageType);
struct ActionableNotification {
-
- /**
- * The message type. See {
- *
- */
- MessageType severity;
- /**
- * The actual message
- *
- */
+ /**
+ * The message type. See {
+ *
+ */
+
+ MessageType severity;
+ /**
+ * The actual message
+ *
+ */
- std::string message;
+ std::string message;
- /**
- * Optional data
- *
- */
+ /**
+ * Optional data
+ *
+ */
- boost::optional<lsp::Any> data;
+ boost::optional<lsp::Any> data;
- /**
- * Optional commands
- *
- */
+ /**
+ * Optional commands
+ *
+ */
- std::vector<lsCommandWithAny> commands;
+ std::vector<lsCommandWithAny> commands;
- MAKE_SWAP_METHOD(ActionableNotification, severity, message, data, commands)
+ MAKE_SWAP_METHOD(ActionableNotification, severity, message, data, commands)
};
MAKE_REFLECT_STRUCT(ActionableNotification, severity, message, data, commands)
@@ -114,27 +114,27 @@ DEFINE_NOTIFICATION_TYPE(lang_actionableNotification, ActionableNotification, "l
struct ProgressReport {
- std::string ToString() const;
+ std::string ToString() const;
- std::string id;
+ std::string id;
- std::string task;
+ std::string task;
- std::string subTask;
+ std::string subTask;
- std::string status;
+ std::string status;
- int totalWork = 0;
+ int totalWork = 0;
- int workDone = 0;
+ int workDone = 0;
- bool complete = false;
- MAKE_SWAP_METHOD(ProgressReport, id, task, subTask, status, workDone, complete);
+ bool complete = false;
+ MAKE_SWAP_METHOD(ProgressReport, id, task, subTask, status, workDone, complete);
};
@@ -147,24 +147,24 @@ MAKE_REFLECT_STRUCT(ProgressReport, id, task, subTask, status, workDone, complet
DEFINE_NOTIFICATION_TYPE(lang_progressReport, ProgressReport, "language/progressReport");
enum EventType {
- /**
- * classpath updated event.
- */
- ClasspathUpdated = (100),
-
- /**
- * projects imported event.
- */
- ProjectsImported = (200)
+ /**
+ * 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)
+ 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
+DEFINE_NOTIFICATION_TYPE(lang_eventNotification, EventNotification, "language/eventNotification");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/location_type.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/location_type.h
index 14e130f571..c4197917a9 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/location_type.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/location_type.h
@@ -4,15 +4,15 @@
#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);
+ lsLocation();
+ lsLocation(lsDocumentUri uri, lsRange range);
- bool operator==(const lsLocation& other) const;
- bool operator<(const lsLocation& o) const;
+ bool operator==(const lsLocation& other) const;
+ bool operator<(const lsLocation& o) const;
- lsDocumentUri uri;
- lsRange range;
- MAKE_SWAP_METHOD(lsLocation, uri, range)
+ lsDocumentUri uri;
+ lsRange range;
+ MAKE_SWAP_METHOD(lsLocation, uri, range)
};
MAKE_REFLECT_STRUCT(lsLocation, uri, range)
@@ -20,44 +20,44 @@ MAKE_REFLECT_STRUCT(lsLocation, uri, range)
struct LinkLocation :public lsLocation
{
- std::string displayName;
- std::string kind;
- MAKE_REFLECT_STRUCT(LinkLocation, uri, range, displayName, kind)
+ 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<lsRange> originSelectionRange;
+ /**
+ * 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<lsRange> originSelectionRange;
- /**
- * The target resource identifier of this link.
- */
+ /**
+ * The target resource identifier of this link.
+ */
- lsDocumentUri targetUri;
+ 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.
- */
+ /**
+ * 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;
+ 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`
- */
+ /**
+ * 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;
+ lsRange targetSelectionRange;
- MAKE_SWAP_METHOD(LocationLink, originSelectionRange, targetUri, targetRange, targetSelectionRange);
+ MAKE_SWAP_METHOD(LocationLink, originSelectionRange, targetUri, targetRange, targetSelectionRange);
};
-MAKE_REFLECT_STRUCT(LocationLink, originSelectionRange, targetUri, targetRange, targetSelectionRange); \ No newline at end of file
+MAKE_REFLECT_STRUCT(LocationLink, originSelectionRange, targetUri, targetRange, targetSelectionRange);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsAny.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsAny.h
index 3335aa86dc..035382669f 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsAny.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsAny.h
@@ -5,75 +5,75 @@
#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 <typename T>
- bool Get(T& value);
-
- template <typename T>
- void Set(T& value);
-
- int GuessType();
- int GetType();
-
- void Set(std::unique_ptr<LspMessage> 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<lsp::Any::Type>(-1));
- A a_object;
- any.GetFromMap(a_object);
- */
- template <typename T>
- bool GetFromMap(T& value);
-
-
- template <typename T>
- bool GetForMapHelper(T& value);
- bool GetForMapHelper(std::string& value);
- bool GetForMapHelper(boost::optional<std::string>& value);
- private:
- std::unique_ptr<Reader> GetReader();
- std::unique_ptr<Writer> GetWriter() const;
- void SetData(std::unique_ptr<Writer>&);
-
- std::string data;
- int jsonType = kUnKnown;
-
- };
+ 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 <typename T>
+ bool Get(T& value);
+
+ template <typename T>
+ void Set(T& value);
+
+ int GuessType();
+ int GetType();
+
+ void Set(std::unique_ptr<LspMessage> 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<lsp::Any::Type>(-1));
+ A a_object;
+ any.GetFromMap(a_object);
+ */
+ template <typename T>
+ bool GetFromMap(T& value);
+
+
+ template <typename T>
+ bool GetForMapHelper(T& value);
+ bool GetForMapHelper(std::string& value);
+ bool GetForMapHelper(boost::optional<std::string>& value);
+ private:
+ std::unique_ptr<Reader> GetReader();
+ std::unique_ptr<Writer> GetWriter() const;
+ void SetData(std::unique_ptr<Writer>&);
+
+ std::string data;
+ int jsonType = kUnKnown;
+
+ };
};
@@ -84,22 +84,22 @@ extern void Reflect(Writer& visitor, lsp::Any& value);
template <typename T>
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);
- }
+ auto it = visitor.find(name);
+ if (it != visitor.end())
+ {
+ it->second.GetForMapHelper(value);
+ }
}
template <typename T>
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<lsp::Any::Type>(-1));
- any.Get(value);
- }
+ auto it = visitor.find(name);
+ if (it != visitor.end())
+ {
+ lsp::Any any;
+ any.SetJsonString(it->second, static_cast<lsp::Any::Type>(-1));
+ any.Get(value);
+ }
}
#define REFLECT_MAP_TO_STRUCT(type, ...) \
@@ -111,49 +111,49 @@ void ReflectMember(std::map < std::string, std::string>& visitor, const char* na
namespace lsp
{
- template <typename T>
- bool Any::Get(T& value)
- {
- const auto visitor = GetReader();
- Reflect(*visitor, value);
- return true;
- }
-
- template <typename T>
- void Any::Set(T& value)
- {
- auto visitor = GetWriter();
- Reflect(*visitor, value);
- SetData(visitor);
- }
-
- template <typename T>
- 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 <typename T>
- 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;
- }
+ template <typename T>
+ bool Any::Get(T& value)
+ {
+ const auto visitor = GetReader();
+ Reflect(*visitor, value);
+ return true;
+ }
+
+ template <typename T>
+ void Any::Set(T& value)
+ {
+ auto visitor = GetWriter();
+ Reflect(*visitor, value);
+ SetData(visitor);
+ }
+
+ template <typename T>
+ 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 <typename T>
+ 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
index 06a14f1540..cf0a2aa65b 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCodeAction.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCodeAction.h
@@ -13,46 +13,46 @@
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<lsDiagnostic>> 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)
+ /**
+ * 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<lsDiagnostic>> 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<lsCommandWithAny>, boost::optional<CodeAction> > Either;
+ typedef std::pair<boost::optional<lsCommandWithAny>, boost::optional<CodeAction> > Either;
};
-extern void Reflect(Reader& visitor, TextDocumentCodeAction::Either& value); \ No newline at end of file
+extern void Reflect(Reader& visitor, TextDocumentCodeAction::Either& value);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCommand.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCommand.h
index 94307f1479..88ced6e41c 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCommand.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCommand.h
@@ -15,29 +15,29 @@
//extension code could handle the command.The protocol currently doesn¡¯t specify a set of well - known commands.
template <typename AnyArray>
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<AnyArray> arguments;
+ // 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<AnyArray> arguments;
- void swap(lsCommand<AnyArray>& arg) noexcept
- {
- title.swap(arg.title);
- command.swap(arg.command);
- arguments.swap(arg.arguments);
- }
+ void swap(lsCommand<AnyArray>& arg) noexcept
+ {
+ title.swap(arg.title);
+ command.swap(arg.command);
+ arguments.swap(arg.arguments);
+ }
};
template <typename TVisitor, typename T>
void Reflect(TVisitor& visitor, lsCommand<T>& value) {
- REFLECT_MEMBER_START();
- REFLECT_MEMBER(title);
- REFLECT_MEMBER(command);
- REFLECT_MEMBER(arguments);
- REFLECT_MEMBER_END();
+ REFLECT_MEMBER_START();
+ REFLECT_MEMBER(title);
+ REFLECT_MEMBER(command);
+ REFLECT_MEMBER(arguments);
+ REFLECT_MEMBER_END();
}
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsDocumentUri.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsDocumentUri.h
index 5d24f59e3a..255c4c39ba 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsDocumentUri.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsDocumentUri.h
@@ -2,24 +2,24 @@
#include "LibLsp/JsonRpc/serializer.h"
#include <string>
struct lsDocumentUri {
- static lsDocumentUri FromPath(const AbsolutePath& path);
+ 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;
+ lsDocumentUri();
-
- std::string raw_uri_;
- void swap(lsDocumentUri& arg) noexcept
- {
- raw_uri_.swap(arg.raw_uri_);
- }
+ 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);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsFormattingOptions.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsFormattingOptions.h
index a92df9b077..cc3ad4bbac 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsFormattingOptions.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsFormattingOptions.h
@@ -3,41 +3,41 @@
#include "LibLsp/JsonRpc/serializer.h"
struct lsFormattingOptions {
- struct KeyData {
- boost::optional<bool> _boolean;
- boost::optional<int32_t> _integer;
- boost::optional<std::string> _string;
- };
+ struct KeyData {
+ boost::optional<bool> _boolean;
+ boost::optional<int32_t> _integer;
+ boost::optional<std::string> _string;
+ };
- // Size of a tab in spaces.
- int tabSize =4;
- // Prefer spaces over tabs.
- bool insertSpaces = true;
+ // 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<bool> trimTrailingWhitespace;
+ /**
+ * Trim trailing whitespace on a line.
+ *
+ * @since 3.15.0
+ */
+ boost::optional<bool> trimTrailingWhitespace;
- /**
- * Insert a newline character at the end of the file if one does not exist.
- *
- * @since 3.15.0
- */
- boost::optional<bool> insertFinalNewline;
+ /**
+ * Insert a newline character at the end of the file if one does not exist.
+ *
+ * @since 3.15.0
+ */
+ boost::optional<bool> insertFinalNewline;
- /**
- * Trim all newlines after the final newline at the end of the file.
- *
- * @since 3.15.0
- */
- boost::optional<bool> trimFinalNewlines;
- boost::optional<KeyData> key;
+ /**
+ * Trim all newlines after the final newline at the end of the file.
+ *
+ * @since 3.15.0
+ */
+ boost::optional<bool> trimFinalNewlines;
+ boost::optional<KeyData> 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
+extern void Reflect(Writer& visitor, lsFormattingOptions::KeyData& value);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsMarkedString.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsMarkedString.h
index 9191aa66d1..975ee4fed0 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsMarkedString.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsMarkedString.h
@@ -20,24 +20,24 @@
// Note that markdown strings will be sanitized - that means html will be
// escaped.
struct lsMarkedString {
- boost::optional<std::string> language;
- std::string value;
+ boost::optional<std::string> language;
+ std::string value;
};
struct MarkupContent {
- /**
- * The type of the Markup.
- */
+ /**
+ * The type of the Markup.
+ */
- std::string kind;
+ std::string kind;
- /**
- * The content itself.
- */
-
- std::string value;
+ /**
+ * The content itself.
+ */
- MAKE_SWAP_METHOD(MarkupContent, kind, value);
+ std::string value;
+
+ MAKE_SWAP_METHOD(MarkupContent, kind, value);
};
MAKE_REFLECT_STRUCT(MarkupContent,kind,value);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h
index 8c2106e16e..a14d75ed90 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h
@@ -11,30 +11,30 @@
//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)
+ 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
+MAKE_REFLECT_STRUCT(lsPosition, line, character);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsRange.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsRange.h
index 6cc01e37a7..97d78712d7 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsRange.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsRange.h
@@ -12,21 +12,21 @@
//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);
+ 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)
+ 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
+MAKE_REFLECT_STRUCT(lsRange, start, end)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsResponseError.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsResponseError.h
index 6146d6188f..9b0120e3e4 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsResponseError.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsResponseError.h
@@ -5,113 +5,113 @@
#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,
-
-
+ // 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<lsp::Any> data;
- std::string ToString();
- void Write(Writer& visitor);
-
- MAKE_SWAP_METHOD(lsResponseError, code, message, data)
+ 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<lsp::Any> 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
+MAKE_REFLECT_STRUCT(lsResponseError, code, message, data)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h
index 0bab8bc3d8..bebbcd48c2 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h
@@ -8,17 +8,17 @@
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);
+ // 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
+MAKE_REFLECT_STRUCT(lsTextDocumentEdit, textDocument, edits);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h
index bb316eae5a..0129df9b99 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h
@@ -5,10 +5,10 @@
//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;
+ /**
+ * The text document's URI.
+ */
+ lsDocumentUri uri;
MAKE_SWAP_METHOD(lsTextDocumentIdentifier, uri)
};
-MAKE_REFLECT_STRUCT(lsTextDocumentIdentifier, uri) \ No newline at end of file
+MAKE_REFLECT_STRUCT(lsTextDocumentIdentifier, uri)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h
index 4d9b4ccc9f..c5bc915132 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h
@@ -7,20 +7,20 @@
//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 URI.
+ lsDocumentUri uri;
- // The text document's language identifier.
- std::string languageId;
+ // 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 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;
+ // The content of the opened text document.
+ std::string text;
- MAKE_SWAP_METHOD(lsTextDocumentItem, uri, languageId, version, text)
+ MAKE_SWAP_METHOD(lsTextDocumentItem, uri, languageId, version, text)
};
-MAKE_REFLECT_STRUCT(lsTextDocumentItem, uri, languageId, version, text) \ No newline at end of file
+MAKE_REFLECT_STRUCT(lsTextDocumentItem, uri, languageId, version, text)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentPositionParams.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentPositionParams.h
index 52d291351e..6f0940c0b2 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentPositionParams.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentPositionParams.h
@@ -9,18 +9,18 @@
* 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 text document.
+ lsTextDocumentIdentifier textDocument;
- // The position inside the text document.
- lsPosition position;
+ // The position inside the text document.
+ lsPosition position;
+
+ /**
+ * Legacy property to support protocol version 1.0 requests.
+ */
+ boost::optional<lsDocumentUri> uri;
- /**
- * Legacy property to support protocol version 1.0 requests.
- */
- boost::optional<lsDocumentUri> 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
index 8785e0dcbc..de06e85e92 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextEdit.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextEdit.h
@@ -17,24 +17,24 @@
*/
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<bool> 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)
+ /**
+ * 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<bool> 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)
@@ -64,23 +64,23 @@ using lsChangeAnnotationIdentifier = std::string;
//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 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 string to be inserted. For delete operations use an
+ // empty string.
+ std::string newText;
- /**
+ /**
* The actual annotation identifier.
*/
- boost::optional<lsChangeAnnotationIdentifier> annotationId;
-
+ boost::optional<lsChangeAnnotationIdentifier> annotationId;
- bool operator==(const lsTextEdit& that);
- std::string ToString() const;
- MAKE_SWAP_METHOD(lsTextEdit, range, newText, annotationId)
+
+ bool operator==(const lsTextEdit& that);
+ std::string ToString() const;
+ MAKE_SWAP_METHOD(lsTextEdit, range, newText, annotationId)
};
MAKE_REFLECT_STRUCT(lsTextEdit, range, newText, annotationId)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h
index 8a858053b1..7e8ccbd635 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h
@@ -8,13 +8,13 @@
struct lsVersionedTextDocumentIdentifier
{
- lsDocumentUri uri;
- // The version number of this document. number | null
- boost::optional<int> version;
+ lsDocumentUri uri;
+ // The version number of this document. number | null
+ boost::optional<int> version;
- lsTextDocumentIdentifier AsTextDocumentIdentifier() const;
+ lsTextDocumentIdentifier AsTextDocumentIdentifier() const;
- MAKE_SWAP_METHOD(lsVersionedTextDocumentIdentifier, uri, version)
+ MAKE_SWAP_METHOD(lsVersionedTextDocumentIdentifier, uri, version)
};
MAKE_REFLECT_STRUCT(lsVersionedTextDocumentIdentifier, uri, version)
@@ -29,4 +29,4 @@ MAKE_REFLECT_STRUCT(lsVersionedTextDocumentIdentifier, uri, version)
* 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
+using lsOptionalVersionedTextDocumentIdentifier = lsVersionedTextDocumentIdentifier;
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h
index c7fb73930a..4df020d7a2 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h
@@ -20,36 +20,36 @@
struct lsChangeAnnotations
{
- lsChangeAnnotation id;
- MAKE_SWAP_METHOD(lsChangeAnnotations, id)
+ 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<lsDocumentUri, std::vector<lsTextEdit>> 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<std::string, std::vector<lsTextEdit> > > changes;
- typedef std::pair < boost::optional<lsTextDocumentEdit>, boost::optional<lsp::Any> > 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)
+ // Holds changes to existing resources.
+ // changes ? : { [uri:string]: TextEdit[]; };
+ // std::unordered_map<lsDocumentUri, std::vector<lsTextEdit>> 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<std::string, std::vector<lsTextEdit> > > changes;
+ typedef std::pair < boost::optional<lsTextDocumentEdit>, boost::optional<lsp::Any> > 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)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_code_action.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_code_action.h
index 37acc6ca61..2d5c7111fb 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_code_action.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_code_action.h
@@ -13,18 +13,18 @@ struct CommandArgs {
};
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;
+ int i = 0;
+ visitor.IterArray([&](Reader& visitor) {
+ switch (i++) {
+ case 0:
+ Reflect(visitor, value.textDocumentUri);
+ break;
+ case 1:
+ Reflect(visitor, value.edits);
+ break;
- }
- });
+ }
+ });
}
// codeLens
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_completion.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_completion.h
index 250699a44a..d434b31d13 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_completion.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_completion.h
@@ -57,8 +57,8 @@ MAKE_REFLECT_TYPE_PROXY(lsInsertTextFormat);
namespace lsp
{
- std::string ToString(lsCompletionItemKind);
- std::string ToString(lsInsertTextFormat);
+ 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.
@@ -67,7 +67,7 @@ namespace lsp
* 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.
@@ -89,11 +89,11 @@ struct lsCompletionItem {
* 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.
@@ -177,18 +177,18 @@ struct lsCompletionItem {
boost::optional<lsp::Any> data;
std::string ToString();
MAKE_SWAP_METHOD(lsCompletionItem,
- label,
- kind,
- detail,
- documentation,
- sortText,
- insertText,
- filterText,
- insertTextFormat,
- textEdit,
- deprecated, preselect, additionalTextEdits, commitCharacters,
- command, data);
-
+ label,
+ kind,
+ detail,
+ documentation,
+ sortText,
+ insertText,
+ filterText,
+ insertTextFormat,
+ textEdit,
+ deprecated, preselect, additionalTextEdits, commitCharacters,
+ command, data);
+
};
@@ -204,21 +204,21 @@ MAKE_REFLECT_STRUCT(lsCompletionItem,
insertTextFormat,
textEdit,
deprecated, preselect, additionalTextEdits, commitCharacters,
- command, data);
+ 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<lsCompletionItem> items;
-
- void swap(CompletionList& arg) noexcept
- {
- items.swap(arg.items);
- std::swap(isIncomplete, arg.isIncomplete);
- }
+ // This list it not complete. Further typing should result in recomputing
+ // this list.
+ bool isIncomplete = false;
+ // The completion items.
+ std::vector<lsCompletionItem> 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
+MAKE_REFLECT_STRUCT(CompletionList, isIncomplete, items);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h
index d1b1d1ba78..3ddea4b9ee 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h
@@ -28,20 +28,20 @@ MAKE_REFLECT_TYPE_PROXY(lsDiagnosticSeverity);
*/
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),
+ /**
+ * 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);
@@ -56,19 +56,19 @@ MAKE_REFLECT_TYPE_PROXY(DiagnosticTag);
*/
struct DiagnosticRelatedInformation {
- /**
- * The location of this related diagnostic information.
- */
+ /**
+ * The location of this related diagnostic information.
+ */
lsLocation location;
- /**
- * The message of this related diagnostic information.
- */
+ /**
+ * The message of this related diagnostic information.
+ */
- std::string message;
+ std::string message;
- MAKE_SWAP_METHOD(DiagnosticRelatedInformation, location, message)
+ MAKE_SWAP_METHOD(DiagnosticRelatedInformation, location, message)
};
MAKE_REFLECT_STRUCT(DiagnosticRelatedInformation, location, message)
/**
@@ -77,11 +77,11 @@ MAKE_REFLECT_STRUCT(DiagnosticRelatedInformation, location, message)
* @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)
+ /**
+ * An URI to open with more information about the diagnostic error.
+ */
+ std::string href;
+ MAKE_SWAP_METHOD(DiagnosticCodeDescription, href)
};
MAKE_REFLECT_STRUCT(DiagnosticCodeDescription, href)
@@ -114,7 +114,7 @@ struct lsDiagnostic {
* @since 3.15.0
*/
boost::optional<std::vector<DiagnosticTag>> tags;
-
+
/**
* An array of related diagnostic information, e.g. when symbol-names within a scope collide
@@ -142,8 +142,8 @@ MAKE_REFLECT_STRUCT(lsDiagnostic, range, severity, code, codeDescription, source
struct Rsp_Error : ResponseError<lsResponseError, Rsp_Error> {
-
- MAKE_SWAP_METHOD(Rsp_Error, jsonrpc, id, error)
+
+ 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/out_list.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/out_list.h
index 36c4aa78ba..60f8ba3c7f 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/out_list.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/out_list.h
@@ -15,8 +15,8 @@
namespace LocationListEither{
- typedef std::pair< boost::optional<std::vector<lsLocation>> , boost::optional<std::vector<LocationLink> > > Either;
-
+ typedef std::pair< boost::optional<std::vector<lsLocation>> , boost::optional<std::vector<LocationLink> > > 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
index 57298b8d7f..87ebfe89ed 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/symbol.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/symbol.h
@@ -3,45 +3,45 @@
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,
+ 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);
@@ -113,52 +113,52 @@ MAKE_REFLECT_STRUCT(lsSymbolInformation, name, kind, deprecated, location, conta
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<lsDocumentSymbol> > children;
-
- //internal use
- int flags=0;
-
- MAKE_SWAP_METHOD(lsDocumentSymbol, name, kind, range, selectionRange, detail, deprecated, children, flags);
+ /**
+ * 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<lsDocumentSymbol> > 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
+MAKE_REFLECT_STRUCT(lsDocumentSymbol, name, kind, range, selectionRange, detail, deprecated, children, flags);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h
index 612d186f6f..7f5978ff84 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h
@@ -4,115 +4,115 @@
#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,
+ 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,
+ // This one is different from the other kinds as it's a line style
+ // rather than a token style.
+ InactiveCode,
- LastKind = InactiveCode
+ LastKind = InactiveCode
};
std::string toSemanticTokenType(HighlightingKind_clangD kind);
enum class HighlightingModifier_clangD {
- Declaration,
- Deprecated,
- Deduced,
- Readonly,
- Static,
- Abstract,
- DependentName,
- DefaultLibrary,
+ Declaration,
+ Deprecated,
+ Deduced,
+ Readonly,
+ Static,
+ Abstract,
+ DependentName,
+ DefaultLibrary,
- FunctionScope,
- ClassScope,
- FileScope,
- GlobalScope,
+ FunctionScope,
+ ClassScope,
+ FileScope,
+ GlobalScope,
- LastModifier = 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
+ 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<SemanticTokenType>& 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
+ 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
+ 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<SemanticTokenModifier>&);
@@ -120,85 +120,85 @@ unsigned toSemanticTokenModifiers(std::vector<SemanticTokenModifier>&);
/// 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;
+ /// 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<int32_t> data;
- static std::vector<int32_t> encodeTokens(std::vector<SemanticToken>& tokens);
+ /**
+ * 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<int32_t> data;
+ static std::vector<int32_t> encodeTokens(std::vector<SemanticToken>& 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.
- */
+ /**
+ * 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<std::string> resultId;
MAKE_SWAP_METHOD(SemanticTokens, data, resultId)
};
@@ -206,9 +206,9 @@ MAKE_REFLECT_STRUCT(SemanticTokens, data, resultId)
/// Body of textDocument/semanticTokens/full request.
struct SemanticTokensParams {
- /// The text document.
- lsTextDocumentIdentifier textDocument;
- MAKE_REFLECT_STRUCT(SemanticTokensParams, textDocument)
+ /// The text document.
+ lsTextDocumentIdentifier textDocument;
+ MAKE_REFLECT_STRUCT(SemanticTokensParams, textDocument)
};
MAKE_REFLECT_STRUCT(SemanticTokensParams, textDocument)
@@ -216,28 +216,28 @@ 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;
+ /// 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)
};
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<int32_t> tokens; // encoded as a flat integer array
+ // 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<int32_t> tokens; // encoded as a flat integer array
- MAKE_REFLECT_STRUCT(SemanticTokensEdit, startToken, deleteTokens, tokens)
+ MAKE_REFLECT_STRUCT(SemanticTokensEdit, startToken, deleteTokens, tokens)
};
MAKE_REFLECT_STRUCT(SemanticTokensEdit, startToken, deleteTokens, tokens)
@@ -245,23 +245,23 @@ 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<std::string > resultId;
- /// Set if we computed edits relative to a previous set of tokens.
- boost::optional< std::vector<SemanticTokensEdit> > edits;
- /// Set if we computed a fresh set of tokens.
- /// Set if we computed edits relative to a previous set of tokens.
- boost::optional<std::vector<int32_t>> tokens; // encoded as integer array
- MAKE_REFLECT_STRUCT(SemanticTokensOrDelta, resultId, edits, tokens)
+ boost::optional<std::string > resultId;
+ /// Set if we computed edits relative to a previous set of tokens.
+ boost::optional< std::vector<SemanticTokensEdit> > edits;
+ /// Set if we computed a fresh set of tokens.
+ /// Set if we computed edits relative to a previous set of tokens.
+ boost::optional<std::vector<int32_t>> tokens; // encoded as integer array
+ MAKE_REFLECT_STRUCT(SemanticTokensOrDelta, resultId, edits, tokens)
};
MAKE_REFLECT_STRUCT(SemanticTokensOrDelta, resultId, edits, tokens)
-
+
struct SemanticTokensLegend {
- std::vector<std::string> tokenTypes;
- std::vector<std::string> tokenModifiers;
- MAKE_REFLECT_STRUCT(SemanticTokensLegend, tokenTypes, tokenModifiers)
+ std::vector<std::string> tokenTypes;
+ std::vector<std::string> tokenModifiers;
+ MAKE_REFLECT_STRUCT(SemanticTokensLegend, tokenTypes, tokenModifiers)
};
MAKE_REFLECT_STRUCT(SemanticTokensLegend, tokenTypes, tokenModifiers)
DEFINE_REQUEST_RESPONSE_TYPE(td_semanticTokens_full, SemanticTokensParams,boost::optional<SemanticTokens >,"textDocument/semanticTokens/full")
-DEFINE_REQUEST_RESPONSE_TYPE(td_semanticTokens_full_delta, SemanticTokensDeltaParams, boost::optional<SemanticTokensOrDelta >, "textDocument/semanticTokens/full/delta") \ No newline at end of file
+DEFINE_REQUEST_RESPONSE_TYPE(td_semanticTokens_full_delta, SemanticTokensDeltaParams, boost::optional<SemanticTokensOrDelta >, "textDocument/semanticTokens/full/delta")
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/callHierarchy.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/callHierarchy.h
index a005c182e1..432fa518d5 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/callHierarchy.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/callHierarchy.h
@@ -12,56 +12,56 @@ MAKE_REFLECT_TYPE_PROXY(SymbolTag)
struct CallHierarchyPrepareParams
{
- lsTextDocumentIdentifier textDocument;
- lsPosition position;
+ lsTextDocumentIdentifier textDocument;
+ lsPosition position;
- MAKE_SWAP_METHOD(CallHierarchyPrepareParams,
- textDocument,
- position)
+ MAKE_SWAP_METHOD(CallHierarchyPrepareParams,
+ textDocument,
+ position)
};
MAKE_REFLECT_STRUCT(CallHierarchyPrepareParams,
- textDocument,
- position)
+ textDocument,
+ position)
- /// Represents programming constructs like functions or constructors
- /// in the context of call hierarchy.
+ /// 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<std::vector<SymbolTag>> tags;
-
- /// More detaill for this item, e.g. the signature of a function.
- boost::optional<std::string> 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<lsp::Any> data;
- MAKE_SWAP_METHOD(CallHierarchyItem, name, kind, tags, detail, uri, range, selectionRange, data)
+ /// The name of this item.
+ std::string name;
+
+ /// The kind of this item.
+ SymbolKind kind;
+
+ /// Tags for this item.
+ boost::optional<std::vector<SymbolTag>> tags;
+
+ /// More detaill for this item, e.g. the signature of a function.
+ boost::optional<std::string> 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<lsp::Any> 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)
@@ -69,21 +69,21 @@ MAKE_REFLECT_STRUCT(CallHierarchyItem, name, kind, tags, detail, uri, range, sel
/// The parameter of a `callHierarchy/incomingCalls` request.
struct CallHierarchyIncomingCallsParams {
- CallHierarchyItem item;
- MAKE_SWAP_METHOD(CallHierarchyIncomingCallsParams,item)
+ 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 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<lsRange> fromRanges;
- MAKE_SWAP_METHOD(CallHierarchyIncomingCall, from, fromRanges)
+ /// The range at which the calls appear.
+ /// This is relative to the caller denoted by `From`.
+ std::vector<lsRange> fromRanges;
+ MAKE_SWAP_METHOD(CallHierarchyIncomingCall, from, fromRanges)
};
MAKE_REFLECT_STRUCT(CallHierarchyIncomingCall, from, fromRanges)
@@ -92,30 +92,30 @@ MAKE_REFLECT_STRUCT(CallHierarchyIncomingCall, from, fromRanges)
/// The parameter of a `callHierarchy/outgoingCalls` request.
struct CallHierarchyOutgoingCallsParams {
- CallHierarchyItem item;
- MAKE_SWAP_METHOD(CallHierarchyOutgoingCallsParams, item)
+ 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 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<lsRange> fromRanges;
- MAKE_SWAP_METHOD(CallHierarchyOutgoingCall, to, fromRanges)
+ /// The range at which this item is called.
+ /// This is the range relative to the caller, and not `To`.
+ std::vector<lsRange> fromRanges;
+ MAKE_SWAP_METHOD(CallHierarchyOutgoingCall, to, fromRanges)
};
MAKE_REFLECT_STRUCT(CallHierarchyOutgoingCall, to, fromRanges)
DEFINE_REQUEST_RESPONSE_TYPE(td_prepareCallHierarchy, CallHierarchyPrepareParams,
- boost::optional<std::vector<CallHierarchyItem>>, "textDocument/prepareCallHierarchy")
+ boost::optional<std::vector<CallHierarchyItem>>, "textDocument/prepareCallHierarchy")
DEFINE_REQUEST_RESPONSE_TYPE(td_incomingCalls, CallHierarchyIncomingCallsParams,
- boost::optional<std::vector<CallHierarchyIncomingCall>>, "callHierarchy/incomingCalls")
+ boost::optional<std::vector<CallHierarchyIncomingCall>>, "callHierarchy/incomingCalls")
DEFINE_REQUEST_RESPONSE_TYPE(td_outgoingCalls, CallHierarchyOutgoingCallsParams,
- boost::optional<std::vector<CallHierarchyOutgoingCall>>, "callHierarchy/CallHierarchyOutgoingCall") \ No newline at end of file
+ boost::optional<std::vector<CallHierarchyOutgoingCall>>, "callHierarchy/CallHierarchyOutgoingCall")
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_action.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_action.h
index 419fdfbc9b..e72d83af90 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_action.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_action.h
@@ -7,24 +7,24 @@
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* 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";
+ extern const char* CONVERT_ANONYMOUS_CLASS_TO_NESTED_COMMAND ;// "convertAnonymousClassToNestedCommand";
};
/**
* The code action request is sent from the client to the server to compute
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_lens.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_lens.h
index 7fd5ae0cf9..9dd763333d 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_lens.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_lens.h
@@ -4,7 +4,7 @@
#include "LibLsp/JsonRpc/lsResponseMessage.h"
struct lsDocumentCodeLensParams {
-
+
/**
* The document to request code lens for.
*/
@@ -18,15 +18,15 @@ 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<lsCommandWithAny> 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)
+ // 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<lsCommandWithAny> 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)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/colorPresentation.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/colorPresentation.h
index 22574e3e19..c70b6502d2 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/colorPresentation.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/colorPresentation.h
@@ -12,52 +12,52 @@
struct ColorPresentationParams {
- /**
+ /**
* The text document.
*/
- lsTextDocumentIdentifier textDocument;
+ lsTextDocumentIdentifier textDocument;
- /**
- * The range in the document where this color appers.
- */
+ /**
+ * The range in the document where this color appers.
+ */
- lsRange range;
+ lsRange range;
- /**
- * The actual color value for this color range.
- */
+ /**
+ * The actual color value for this color range.
+ */
- TextDocument::Color color;
- MAKE_SWAP_METHOD(ColorPresentationParams, textDocument, range, color)
+ 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<lsTextEdit> additionalTextEdits;
- MAKE_SWAP_METHOD(ColorPresentation, label, textEdit, additionalTextEdits)
+ /**
+ * 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<lsTextEdit> additionalTextEdits;
+ MAKE_SWAP_METHOD(ColorPresentation, label, textEdit, additionalTextEdits)
};
MAKE_REFLECT_STRUCT(ColorPresentation, label, textEdit, additionalTextEdits)
DEFINE_REQUEST_RESPONSE_TYPE(td_colorPresentation,
- ColorPresentationParams, std::vector<ColorPresentation>, "textDocument/colorPresentation") \ No newline at end of file
+ ColorPresentationParams, std::vector<ColorPresentation>, "textDocument/colorPresentation")
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/completion.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/completion.h
index 883c5cfe3a..916d4550e9 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/completion.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/completion.h
@@ -41,9 +41,9 @@ struct lsCompletionParams : lsTextDocumentPositionParams {
// send this using
// `ClientCapabilities.textDocument.completion.contextSupport === true`
boost::optional<lsCompletionContext> context;
-
+
MAKE_SWAP_METHOD(lsCompletionParams, textDocument, position, context);
-
+
};
MAKE_REFLECT_STRUCT(lsCompletionParams, textDocument, position, context);
@@ -56,9 +56,9 @@ MAKE_REFLECT_STRUCT(lsCompletionParams, textDocument, position, context);
namespace TextDocumentComplete{
-
- typedef std::pair< boost::optional<std::vector<lsCompletionItem>>, boost::optional<CompletionList> > Either;
-
+
+ typedef std::pair< boost::optional<std::vector<lsCompletionItem>>, boost::optional<CompletionList> > Either;
+
};
extern void Reflect(Reader& visitor, TextDocumentComplete::Either& value);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/didRenameFiles.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/didRenameFiles.h
index e8a6235a00..a7c6fdba34 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/didRenameFiles.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/didRenameFiles.h
@@ -9,31 +9,31 @@
class FileRenameEvent {
public:
- std::string oldUri;
- std::string newUri;
+ std::string oldUri;
+ std::string newUri;
- FileRenameEvent() {
- }
+ FileRenameEvent() {
+ }
- FileRenameEvent(std::string oldUri, std::string newUri) {
- this->oldUri = oldUri;
- this->newUri = newUri;
- }
- MAKE_SWAP_METHOD(FileRenameEvent, oldUri, newUri);
+ 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 <FileRenameEvent> files;
+ std::vector <FileRenameEvent> files;
- FileRenameParams() {
- }
+ FileRenameParams() {
+ }
- FileRenameParams(std::vector<FileRenameEvent>& files) {
- this->files = files;
- }
- MAKE_SWAP_METHOD(FileRenameParams, files);
+ FileRenameParams(std::vector<FileRenameEvent>& files) {
+ this->files = files;
+ }
+ MAKE_SWAP_METHOD(FileRenameParams, files);
};
MAKE_REFLECT_STRUCT(FileRenameParams, files);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_change.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_change.h
index 0887bf6602..fda407f93f 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_change.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_change.h
@@ -8,38 +8,38 @@
#include "LibLsp/lsp/lsRange.h"
#include "LibLsp/lsp/lsDocumentUri.h"
struct lsTextDocumentContentChangeEvent {
- // The range of the document that changed.
- boost::optional<lsRange> range;
- // The length of the range that got replaced.
- boost::optional<int> rangeLength;
- // The new text of the range/document.
- std::string text;
-
- MAKE_SWAP_METHOD(lsTextDocumentContentChangeEvent, range, rangeLength, text);
+ // The range of the document that changed.
+ boost::optional<lsRange> range;
+ // The length of the range that got replaced.
+ boost::optional<int> 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<lsTextDocumentContentChangeEvent> contentChanges;
-
- /**
- * Legacy property to support protocol version 1.0 requests.
- */
-
- boost::optional<lsDocumentUri> uri;
-
- void swap(lsTextDocumentDidChangeParams& arg) noexcept
- {
- uri.swap(arg.uri);
- contentChanges.swap(arg.contentChanges);
- textDocument.swap(arg.textDocument);
- }
+ lsVersionedTextDocumentIdentifier textDocument;
+ std::vector<lsTextDocumentContentChangeEvent> contentChanges;
+
+ /**
+ * Legacy property to support protocol version 1.0 requests.
+ */
+
+ boost::optional<lsDocumentUri> 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);
+ textDocument,
+ contentChanges, uri);
/**
* The document change notification is sent from the client to the server to
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_close.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_close.h
index e2eaa2cfcd..d064819ae9 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_close.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_close.h
@@ -11,11 +11,11 @@ namespace TextDocumentDidClose {
struct Params {
lsTextDocumentIdentifier textDocument;
- void swap(Params& arg) noexcept
- {
- textDocument.swap(arg.textDocument);
- }
-
+ void swap(Params& arg) noexcept
+ {
+ textDocument.swap(arg.textDocument);
+ }
+
};
};
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_open.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_open.h
index 7be7a735d6..ed5dfa535f 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_open.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_open.h
@@ -11,15 +11,15 @@ namespace TextDocumentDidOpen {
struct Params {
lsTextDocumentItem textDocument;
-
+
/**
* Legacy property to support protocol version 1.0 requests.
*/
boost::optional<std::string> text;
-
+
MAKE_SWAP_METHOD(TextDocumentDidOpen::Params, textDocument, text);
-
+
};
}
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_save.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_save.h
index 1ce386c415..649c9b76ec 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_save.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_save.h
@@ -15,7 +15,7 @@ namespace TextDocumentDidSave {
// when the save notifcation was requested.
boost::optional<std::string> text;
- MAKE_SWAP_METHOD(TextDocumentDidSave::Params, textDocument, text);
+ MAKE_SWAP_METHOD(TextDocumentDidSave::Params, textDocument, text);
};
};
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/documentColor.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/documentColor.h
index 23a6d08d87..9aeeadba05 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/documentColor.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/documentColor.h
@@ -7,12 +7,12 @@
#include "LibLsp/lsp/lsRange.h"
#include <vector>
struct DocumentColorParams {
- /**
- * The text document.
- */
+ /**
+ * The text document.
+ */
- lsTextDocumentIdentifier textDocument;
- MAKE_SWAP_METHOD(DocumentColorParams, textDocument);
+ lsTextDocumentIdentifier textDocument;
+ MAKE_SWAP_METHOD(DocumentColorParams, textDocument);
};
MAKE_REFLECT_STRUCT(DocumentColorParams, textDocument);
@@ -28,46 +28,46 @@ MAKE_REFLECT_STRUCT(DocumentColorParams, textDocument);
*/
namespace TextDocument {
- struct Color {
- /**
- * The red component of this color in the range [0-1].
- */
- double red = 0;
+ 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 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 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)
- };
+ /**
+ * 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.
- */
+ /**
+ * The range in the document where this color appers.
+ */
- lsRange range;
+ lsRange range;
- /**
- * The actual color value for this color range.
- */
+ /**
+ * The actual color value for this color range.
+ */
- TextDocument::Color color;
- MAKE_SWAP_METHOD(ColorInformation, range, color)
+ TextDocument::Color color;
+ MAKE_SWAP_METHOD(ColorInformation, range, color)
};
MAKE_REFLECT_STRUCT(ColorInformation,range,color)
-DEFINE_REQUEST_RESPONSE_TYPE(td_documentColor, DocumentColorParams,std::vector<ColorInformation>, "textDocument/documentColor"); \ No newline at end of file
+DEFINE_REQUEST_RESPONSE_TYPE(td_documentColor, DocumentColorParams,std::vector<ColorInformation>, "textDocument/documentColor");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_link.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_link.h
index 536a625c4c..e450a08df1 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_link.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_link.h
@@ -9,7 +9,7 @@ namespace TextDocumentDocumentLink {
struct Params {
// The document to provide document links for.
lsTextDocumentIdentifier textDocument;
- MAKE_SWAP_METHOD(Params, textDocument)
+ MAKE_SWAP_METHOD(Params, textDocument)
};
};
@@ -27,9 +27,9 @@ struct lsDocumentLink {
boost::optional<lsDocumentUri> target;
boost::optional<lsp::Any> data;
-
+
MAKE_SWAP_METHOD(lsDocumentLink, range, target, data)
-
+
};
MAKE_REFLECT_STRUCT(lsDocumentLink, range, target,data);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h
index 8aa6e8b00e..150dde1f0b 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h
@@ -18,7 +18,7 @@ MAKE_REFLECT_STRUCT(lsDocumentSymbolParams, textDocument);
struct TextDocumentDocumentSymbol{
- typedef std::pair< boost::optional<lsSymbolInformation> , boost::optional<lsDocumentSymbol> > Either;
+ typedef std::pair< boost::optional<lsSymbolInformation> , boost::optional<lsDocumentSymbol> > Either;
};
void Reflect(Reader& visitor, TextDocumentDocumentSymbol::Either& value);
@@ -42,14 +42,14 @@ void Reflect(Reader& visitor, TextDocumentDocumentSymbol::Either& value);
* </p>
*/
-//DEFINE_REQUEST_RESPONSE_TYPE(td_symbol,
-// lsDocumentSymbolParams,
-// std::vector<TextDocumentDocumentSymbol::Either> );
+//DEFINE_REQUEST_RESPONSE_TYPE(td_symbol,
+// lsDocumentSymbolParams,
+// std::vector<TextDocumentDocumentSymbol::Either> );
//
-DEFINE_REQUEST_RESPONSE_TYPE(td_symbol,
- lsDocumentSymbolParams,
- std::vector< lsDocumentSymbol >,"textDocument/documentSymbol" );
+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
index 27977a4517..f863b4991d 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/foldingRange.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/foldingRange.h
@@ -9,47 +9,47 @@
struct FoldingRangeRequestParams {
- /**
- * The text document.
- */
+ /**
+ * The text document.
+ */
- lsTextDocumentIdentifier textDocument;
- MAKE_SWAP_METHOD(FoldingRangeRequestParams, textDocument)
+ 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)
+ /**
+ * 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)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/formatting.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/formatting.h
index ad54e24bf9..49b7883b5f 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/formatting.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/formatting.h
@@ -8,15 +8,15 @@
namespace TextDocumentFormatting {
struct Params {
- /**
- * The document to format.
- */
+ /**
+ * The document to format.
+ */
lsTextDocumentIdentifier textDocument;
- /**
- * The format options.
- */
+ /**
+ * The format options.
+ */
lsFormattingOptions options;
- MAKE_SWAP_METHOD(Params, textDocument, options);
+ MAKE_SWAP_METHOD(Params, textDocument, options);
};
};
@@ -28,5 +28,5 @@ MAKE_REFLECT_STRUCT(TextDocumentFormatting::Params, textDocument, options);
* Registration Options: TextDocumentRegistrationOptions
*/
DEFINE_REQUEST_RESPONSE_TYPE(td_formatting, TextDocumentFormatting::Params,
- std::vector<lsTextEdit>, "textDocument/formatting");
+ std::vector<lsTextEdit>, "textDocument/formatting");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/highlight.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/highlight.h
index 332baf69e1..0e01416126 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/highlight.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/highlight.h
@@ -14,5 +14,5 @@
*/
DEFINE_REQUEST_RESPONSE_TYPE(td_highlight, lsTextDocumentPositionParams,
- std::vector<lsDocumentHighlight>, "textDocument/documentHighlight");
+ std::vector<lsDocumentHighlight>, "textDocument/documentHighlight");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/hover.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/hover.h
index 5302316c6f..06f3f9613e 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/hover.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/hover.h
@@ -16,21 +16,21 @@
namespace TextDocumentHover
{
- typedef boost::optional< std::vector< std::pair<boost::optional<std::string>, boost::optional<lsMarkedString>> > > Left;
- typedef std::pair< Left, boost::optional<MarkupContent> > Either;
- struct Result {
- /**
- * The hover's content as markdown
- */
- Either contents;
-
- /**
- * An boost::optional range
- */
- boost::optional<lsRange> range;
-
- MAKE_SWAP_METHOD(Result, contents, range)
- };
+ typedef boost::optional< std::vector< std::pair<boost::optional<std::string>, boost::optional<lsMarkedString>> > > Left;
+ typedef std::pair< Left, boost::optional<MarkupContent> > Either;
+ struct Result {
+ /**
+ * The hover's content as markdown
+ */
+ Either contents;
+
+ /**
+ * An boost::optional range
+ */
+ boost::optional<lsRange> range;
+
+ MAKE_SWAP_METHOD(Result, contents, range)
+ };
}
MAKE_REFLECT_STRUCT(TextDocumentHover::Result, contents, range);
@@ -44,12 +44,12 @@ DEFINE_REQUEST_RESPONSE_TYPE(td_hover, lsTextDocumentPositionParams, TextDocumen
//
//};
//MAKE_REFLECT_STRUCT(Rsp_TextDocumentHover,
-// jsonrpc,
-// id,
-// result);
+// jsonrpc,
+// id,
+// result);
//MAKE_REFLECT_STRUCT_OPTIONALS_MANDATORY(Rsp_TextDocumentHover,
// jsonrpc,
-// id,
+// id,
// result);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/linkedEditingRange.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/linkedEditingRange.h
index e4055d359f..96e938a89f 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/linkedEditingRange.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/linkedEditingRange.h
@@ -12,40 +12,40 @@
struct LinkedEditingRangeParams
{
- lsTextDocumentIdentifier textDocument;
- lsPosition position;
+ lsTextDocumentIdentifier textDocument;
+ lsPosition position;
- MAKE_SWAP_METHOD(LinkedEditingRangeParams,
- textDocument,
- position)
+ MAKE_SWAP_METHOD(LinkedEditingRangeParams,
+ textDocument,
+ position)
};
MAKE_REFLECT_STRUCT(LinkedEditingRangeParams,
- textDocument,
- position)
+ 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<lsRange> 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<std::string> wordPattern;
- MAKE_SWAP_METHOD(LinkedEditingRanges,
- ranges,
- wordPattern)
+ /**
+ * 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<std::string> wordPattern;
+ MAKE_SWAP_METHOD(LinkedEditingRanges,
+ ranges,
+ wordPattern)
};
MAKE_REFLECT_STRUCT(LinkedEditingRanges,
- ranges,
- wordPattern)
+ ranges,
+ wordPattern)
DEFINE_REQUEST_RESPONSE_TYPE(td_linkedEditingRange, LinkedEditingRangeParams,
- boost::optional<std::vector<LinkedEditingRanges >>,"textDocument/linkedEditingRange") \ No newline at end of file
+ boost::optional<std::vector<LinkedEditingRanges >>,"textDocument/linkedEditingRange")
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/onTypeFormatting.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/onTypeFormatting.h
index df14ea5d3d..ada2162d12 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/onTypeFormatting.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/onTypeFormatting.h
@@ -17,20 +17,20 @@ struct lsDocumentOnTypeFormattingParams
lsPosition position;
- /**
- * The character that has been typed.
- */
+ /**
+ * The character that has been typed.
+ */
std::string ch;
MAKE_SWAP_METHOD(lsDocumentOnTypeFormattingParams,
- textDocument,
- position,
- options, ch);
+ textDocument,
+ position,
+ options, ch);
};
MAKE_REFLECT_STRUCT(lsDocumentOnTypeFormattingParams,
textDocument,
- position,
+ position,
options,ch);
/**
@@ -40,5 +40,5 @@ MAKE_REFLECT_STRUCT(lsDocumentOnTypeFormattingParams,
* Registration Options: TextDocumentRegistrationOptions
*/
DEFINE_REQUEST_RESPONSE_TYPE(td_onTypeFormatting,
- lsDocumentOnTypeFormattingParams, std::vector<lsTextEdit>, "textDocument/onTypeFormatting");
+ lsDocumentOnTypeFormattingParams, std::vector<lsTextEdit>, "textDocument/onTypeFormatting");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h
index 8c653d9864..a7ece38114 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h
@@ -13,20 +13,20 @@
* Registration Options: TextDocumentRegistrationOptions
*/
struct PrepareRenameResult{
- /**
- * The range of the string to rename
- */
-
- lsRange range;
+ /**
+ * 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)
-
+ std::string placeholder;
+
+ MAKE_SWAP_METHOD(PrepareRenameResult, range, placeholder)
+
};
MAKE_REFLECT_STRUCT(PrepareRenameResult,range,placeholder)
@@ -36,5 +36,5 @@ typedef std::pair< boost::optional< lsRange>, boost::optional<PrepareRenameResu
extern void Reflect(Reader& visitor, TextDocumentPrepareRenameResult& value);
-DEFINE_REQUEST_RESPONSE_TYPE(td_prepareRename,
- lsTextDocumentPositionParams, TextDocumentPrepareRenameResult, "textDocument/prepareRename"); \ No newline at end of file
+DEFINE_REQUEST_RESPONSE_TYPE(td_prepareRename,
+ lsTextDocumentPositionParams, TextDocumentPrepareRenameResult, "textDocument/prepareRename");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/publishDiagnostics.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/publishDiagnostics.h
index bf28104bbb..8272df10e8 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/publishDiagnostics.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/publishDiagnostics.h
@@ -11,14 +11,14 @@ namespace TextDocumentPublishDiagnostics{
// An array of diagnostic information items.
std::vector<lsDiagnostic> diagnostics;
- MAKE_SWAP_METHOD(Params,uri,diagnostics);
+ MAKE_SWAP_METHOD(Params,uri,diagnostics);
};
-
+
};
MAKE_REFLECT_STRUCT(TextDocumentPublishDiagnostics::Params,
- uri,
- diagnostics);
+ uri,
+ diagnostics);
/**
* Diagnostics notifications are sent from the server to the client to
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/range_formatting.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/range_formatting.h
index b2fe750af1..c3c5ff0d0b 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/range_formatting.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/range_formatting.h
@@ -13,9 +13,9 @@ struct lsTextDocumentRangeFormattingParams {
lsFormattingOptions options;
MAKE_SWAP_METHOD(lsTextDocumentRangeFormattingParams,
- textDocument,
- range,
- options)
+ textDocument,
+ range,
+ options)
};
MAKE_REFLECT_STRUCT(lsTextDocumentRangeFormattingParams,
textDocument,
@@ -29,7 +29,7 @@ MAKE_REFLECT_STRUCT(lsTextDocumentRangeFormattingParams,
* Registration Options: TextDocumentRegistrationOptions
*/
DEFINE_REQUEST_RESPONSE_TYPE(td_rangeFormatting, lsTextDocumentRangeFormattingParams, std::vector<lsTextEdit>,
- "textDocument/rangeFormatting");
+ "textDocument/rangeFormatting");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/references.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/references.h
index 2376912756..f398a0b859 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/references.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/references.h
@@ -13,16 +13,16 @@ namespace TextDocumentReferences {
// Include the declaration of the current symbol.
boost::optional<bool> includeDeclaration;
MAKE_REFLECT_STRUCT(lsReferenceContext,
- includeDeclaration)
+ includeDeclaration)
};
struct Params {
lsTextDocumentIdentifier textDocument;
lsPosition position;
lsReferenceContext context;
- MAKE_SWAP_METHOD(Params,
- textDocument,
- position,
- context)
+ MAKE_SWAP_METHOD(Params,
+ textDocument,
+ position,
+ context)
};
@@ -44,5 +44,5 @@ MAKE_REFLECT_STRUCT(TextDocumentReferences::Params,
*
* Registration Options: TextDocumentRegistrationOptions
*/
-DEFINE_REQUEST_RESPONSE_TYPE(td_references, TextDocumentReferences::Params,
+DEFINE_REQUEST_RESPONSE_TYPE(td_references, TextDocumentReferences::Params,
std::vector<lsLocation>, "textDocument/references");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/rename.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/rename.h
index 35895f0f4f..8b6d085910 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/rename.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/rename.h
@@ -20,10 +20,10 @@ namespace TextDocumentRename {
// request must return a [ResponseError](#ResponseError) with an
// appropriate message set.
std::string newName;
- MAKE_SWAP_METHOD(Params,
- textDocument,
- position,
- newName);
+ MAKE_SWAP_METHOD(Params,
+ textDocument,
+ position,
+ newName);
};
};
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h
index eab5f838fc..dceba1fb8f 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h
@@ -9,23 +9,23 @@
#include "typeHierarchy.h"
struct ResolveTypeHierarchyItemParams {
- /**
- * The hierarchy item to resolve.
- */
+ /**
+ * The hierarchy item to resolve.
+ */
- TypeHierarchyItem item;
+ TypeHierarchyItem item;
- /**
- * The number of hierarchy levels to resolve. {@code 0} indicates no hierarchy level.
- */
- boost::optional<int> resolve;
+ /**
+ * The number of hierarchy levels to resolve. {@code 0} indicates no hierarchy level.
+ */
+ boost::optional<int> resolve;
- /**
- * The direction of the type hierarchy resolution.
- */
+ /**
+ * The direction of the type hierarchy resolution.
+ */
- TypeHierarchyDirection direction;
- MAKE_SWAP_METHOD(ResolveTypeHierarchyItemParams, item, resolve, direction)
+ 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
index 47590e4152..91915275bd 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/selectionRange.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/selectionRange.h
@@ -8,35 +8,35 @@
#include "LibLsp/lsp/lsTextDocumentIdentifier.h"
struct SelectionRangeParams {
- /**
- * The text document.
- */
+ /**
+ * The text document.
+ */
- lsTextDocumentIdentifier textDocument;
+ lsTextDocumentIdentifier textDocument;
- /**
- * The positions inside the text document.
- */
+ /**
+ * The positions inside the text document.
+ */
+
+ std::vector<lsPosition> positions;
+
+ MAKE_SWAP_METHOD(SelectionRangeParams, textDocument, positions)
- std::vector<lsPosition> positions;
-
- MAKE_SWAP_METHOD(SelectionRangeParams, textDocument, positions)
-
};
MAKE_REFLECT_STRUCT(SelectionRangeParams, textDocument, positions)
struct SelectionRange {
- /**
- * The [range](#Range) of this selection range.
- */
+ /**
+ * The [range](#Range) of this selection range.
+ */
- lsRange range;
+ lsRange range;
- /**
- * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.
- */
- boost::optional<SelectionRange*> parent;
- MAKE_SWAP_METHOD(SelectionRange, range, parent)
+ /**
+ * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.
+ */
+ boost::optional<SelectionRange*> parent;
+ MAKE_SWAP_METHOD(SelectionRange, range, parent)
};
extern void Reflect(Reader& visitor, boost::optional<SelectionRange*>& value);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/semanticHighlighting.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/semanticHighlighting.h
index 32bc86f5fb..bfb8619559 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/semanticHighlighting.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/semanticHighlighting.h
@@ -10,19 +10,19 @@
*/
struct SemanticHighlightingInformation {
- /**
- * The zero-based line position in the text document.
- */
- int line = 0;
+ /**
+ * 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 <a href="https://manual.macromates.com/en/language_grammars">
- * TextMate scopes</a>. If the {@code tokens} is empty or not defined, then no highlighted positions are available for the line.
- */
- std::string tokens;
+ /**
+ * 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 <a href="https://manual.macromates.com/en/language_grammars">
+ * TextMate scopes</a>. 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_SWAP_METHOD(SemanticHighlightingInformation, line, tokens)
};
MAKE_REFLECT_STRUCT(SemanticHighlightingInformation, line, tokens);
@@ -32,35 +32,35 @@ MAKE_REFLECT_STRUCT(SemanticHighlightingInformation, line, tokens);
*/
struct SemanticHighlightingParams {
- /**
- * The text document that has to be decorated with the semantic highlighting information.
- */
-
- lsVersionedTextDocumentIdentifier textDocument;
+ /**
+ * The text document that has to be decorated with the semantic highlighting information.
+ */
- /**
- * An array of semantic highlighting information.
- */
+ lsVersionedTextDocumentIdentifier textDocument;
+
+ /**
+ * An array of semantic highlighting information.
+ */
+
+ std::vector<SemanticHighlightingInformation> lines;
+
+ MAKE_SWAP_METHOD(SemanticHighlightingParams, textDocument, lines)
- std::vector<SemanticHighlightingInformation> 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.
- *
- * <p>
- * <b>Note:</b> the <a href=
- * "https://github.com/Microsoft/vscode-languageserver-node/pull/367">{@code textDocument/semanticHighlighting}
- * language feature</a> is not yet part of the official LSP specification.
- */
-DEFINE_NOTIFICATION_TYPE(Notify_semanticHighlighting, SemanticHighlightingParams, "textDocument/semanticHighlighting"); \ No newline at end of file
+ * 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.
+ *
+ * <p>
+ * <b>Note:</b> the <a href=
+ * "https://github.com/Microsoft/vscode-languageserver-node/pull/367">{@code textDocument/semanticHighlighting}
+ * language feature</a> is not yet part of the official LSP specification.
+ */
+DEFINE_NOTIFICATION_TYPE(Notify_semanticHighlighting, SemanticHighlightingParams, "textDocument/semanticHighlighting");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/signature_help.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/signature_help.h
index 2a83645901..837096695e 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/signature_help.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/signature_help.h
@@ -6,8 +6,8 @@
#include "LibLsp/lsp/lsMarkedString.h"
#include "LibLsp/lsp/lsTextDocumentPositionParams.h"
-extern void Reflect(Reader& visitor,
- std::pair<boost::optional<std::string>, boost::optional<MarkupContent>>& value);
+extern void Reflect(Reader& visitor,
+ std::pair<boost::optional<std::string>, boost::optional<MarkupContent>>& value);
@@ -72,9 +72,9 @@ struct lsSignatureHelp {
MAKE_SWAP_METHOD(lsSignatureHelp,
- signatures,
- activeSignature,
- activeParameter)
+ signatures,
+ activeSignature,
+ activeParameter)
};
MAKE_REFLECT_STRUCT(lsSignatureHelp,
signatures,
@@ -89,4 +89,4 @@ MAKE_REFLECT_STRUCT(lsSignatureHelp,
*
* Registration Options: SignatureHelpRegistrationOptions
*/
-DEFINE_REQUEST_RESPONSE_TYPE(td_signatureHelp, lsTextDocumentPositionParams, lsSignatureHelp, "textDocument/signatureHelp"); \ No newline at end of file
+DEFINE_REQUEST_RESPONSE_TYPE(td_signatureHelp, lsTextDocumentPositionParams, lsSignatureHelp, "textDocument/signatureHelp");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/typeHierarchy.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/typeHierarchy.h
index b554d751f3..384cfb68c9 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/typeHierarchy.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/typeHierarchy.h
@@ -6,34 +6,34 @@
#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}.
- *
- * <p>
- * <b>Note:</b> the <a href=
- * "https://github.com/Microsoft/vscode-languageserver-node/pull/426">{@code textDocument/typeHierarchy}
- * language feature</a> is not yet part of the official LSP specification.
- */
+ * 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}.
+ *
+ * <p>
+ * <b>Note:</b> the <a href=
+ * "https://github.com/Microsoft/vscode-languageserver-node/pull/426">{@code textDocument/typeHierarchy}
+ * language feature</a> 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 for retrieving/resolving the subtypes. Value: {@code 0}.
+ */
+ Children = 0,
- /**
- * Flag to use when retrieving/resolving the supertypes. Value: {@code 1}.
- */
- Parents =1,
+ /**
+ * 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
+ /**
+ * Flag for resolving both the super- and subtypes. Value: {@code 2}.
+ */
+ Both=2
};
void Reflect(Reader& reader, TypeHierarchyDirection& value);
@@ -42,10 +42,10 @@ void Reflect(Writer& writer, TypeHierarchyDirection& value);
struct TypeHierarchyParams :public lsTextDocumentPositionParams
{
- boost::optional<int> resolve;
- boost::optional<TypeHierarchyDirection> direction ;
-
- MAKE_SWAP_METHOD(TypeHierarchyParams, textDocument, position, resolve, direction)
+ boost::optional<int> resolve;
+ boost::optional<TypeHierarchyDirection> direction ;
+
+ MAKE_SWAP_METHOD(TypeHierarchyParams, textDocument, position, resolve, direction)
};
MAKE_REFLECT_STRUCT(TypeHierarchyParams, textDocument, position, resolve, direction);
@@ -58,76 +58,76 @@ MAKE_REFLECT_STRUCT(TypeHierarchyParams, textDocument, position, resolve, direc
*/
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<std::string>
- 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<bool> 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<TypeHierarchyItem> > 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<TypeHierarchyItem> > children;
-
- /**
+ /**
+ * 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<std::string>
+ 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<bool> 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<TypeHierarchyItem> > 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<TypeHierarchyItem> > children;
+
+ /**
* An boost::optional data field can be used to identify a type hierarchy item in a resolve request.
*/
- boost::optional<lsp::Any> data;
+ boost::optional<lsp::Any> data;
- MAKE_SWAP_METHOD(TypeHierarchyItem, name, detail, kind, deprecated, uri, range, selectionRange, parents, children, 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
+DEFINE_REQUEST_RESPONSE_TYPE(td_typeHierarchy, TypeHierarchyParams, TypeHierarchyItem, "textDocument/typeHierarchy");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/type_definition.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/type_definition.h
index 38ced43b42..196a65c5d3 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/type_definition.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/type_definition.h
@@ -13,4 +13,4 @@
* Since version 3.6.0
*/
DEFINE_REQUEST_RESPONSE_TYPE(td_typeDefinition,
- lsTextDocumentPositionParams, LocationListEither::Either, "textDocument/typeDefinition"); \ No newline at end of file
+ lsTextDocumentPositionParams, LocationListEither::Either, "textDocument/typeDefinition");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/willSave.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/willSave.h
index 84aa0badaa..29afcac41a 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/willSave.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/willSave.h
@@ -8,41 +8,41 @@
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)
- };
-
+ /**
+ * 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.
- */
+ /**
+ * The document that will be saved.
+ */
lsTextDocumentIdentifier textDocument;
/*
* A reason why a text document is saved.
*/
- boost::optional<TextDocumentSaveReason> reason;
+ boost::optional<TextDocumentSaveReason> reason;
- MAKE_SWAP_METHOD(Params, textDocument, reason);
+ MAKE_SWAP_METHOD(Params, textDocument, reason);
};
};
@@ -67,5 +67,5 @@ DEFINE_NOTIFICATION_TYPE(td_willSave, WillSaveTextDocumentParams::Params, "textD
* Registration Options: TextDocumentRegistrationOptions
*/
DEFINE_REQUEST_RESPONSE_TYPE(td_willSaveWaitUntil,
- WillSaveTextDocumentParams::Params, std::vector<lsTextEdit>, "textDocument/willSaveWaitUntil");
+ WillSaveTextDocumentParams::Params, std::vector<lsTextEdit>, "textDocument/willSaveWaitUntil");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/utils.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/utils.h
index 796b5d2569..95064c34d6 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/utils.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/utils.h
@@ -15,7 +15,7 @@
namespace lsp
{
-
+
// Returns true if |value| starts/ends with |start| or |ending|.
bool StartsWith(std::string value, std::string start);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/windows/MessageNotify.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/windows/MessageNotify.h
index 8499304f55..332fb7e2e7 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/windows/MessageNotify.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/windows/MessageNotify.h
@@ -11,20 +11,20 @@ struct MessageParams {
/**
* The message type.
*/
-
- lsMessageType type = lsMessageType::Error;
-
+
+ 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);
- }
+ 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)
@@ -49,23 +49,23 @@ DEFINE_NOTIFICATION_TYPE(Notify_ShowMessage, MessageParams, "window/showMessage"
* answer from the client.
*/
struct MessageActionItem {
- /**
- * A short title like 'Retry', 'Open Log' etc.
- */
+ /**
+ * A short title like 'Retry', 'Open Log' etc.
+ */
- std::string title;
- MAKE_SWAP_METHOD(MessageActionItem, title)
+ 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<MessageActionItem> actions;
-
- MAKE_SWAP_METHOD(ShowMessageRequestParams, type, message, actions)
+ /**
+ * The message action items to present.
+ */
+ std::vector<MessageActionItem> actions;
+
+ MAKE_SWAP_METHOD(ShowMessageRequestParams, type, message, actions)
};
MAKE_REFLECT_STRUCT(ShowMessageRequestParams, type, message, actions)
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/working_files.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/working_files.h
index e305fee8d0..916268f0fa 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/working_files.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/working_files.h
@@ -44,9 +44,9 @@ struct WorkingFiles {
bool GetFileBufferContent(const AbsolutePath& filename, std::wstring& out)
{
auto file = GetFileByFilename(filename);
- if(!file)
+ if(!file)
return false;
- return GetFileBufferContent(file, out);
+ return GetFileBufferContent(file, out);
}
bool GetFileBufferContent(const AbsolutePath& filename,std::string& out)
{
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/applyEdit.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/applyEdit.h
index 7e2d8bee0a..d1d4bc85df 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/applyEdit.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/applyEdit.h
@@ -8,20 +8,20 @@
struct ApplyWorkspaceEditParams
{
- /**
- * The edits to apply.
- */
+ /**
+ * The edits to apply.
+ */
- lsWorkspaceEdit edit;
+ 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;
+ /**
+ * 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)
+ 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.
@@ -32,9 +32,9 @@ MAKE_REFLECT_STRUCT(ApplyWorkspaceEditParams, edit, label);
struct ApplyWorkspaceEditResponse
{
- bool applied;
- boost::optional<std::string> failureReason;
- MAKE_SWAP_METHOD(ApplyWorkspaceEditResponse, applied, failureReason)
+ bool applied;
+ boost::optional<std::string> failureReason;
+ MAKE_SWAP_METHOD(ApplyWorkspaceEditResponse, applied, failureReason)
};
MAKE_REFLECT_STRUCT(ApplyWorkspaceEditResponse, applied, failureReason);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/configuration.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/configuration.h
index f7709aa607..ad22bf0185 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/configuration.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/configuration.h
@@ -7,22 +7,22 @@
struct ConfigurationItem {
- /**
- * The scope to get the configuration section for.
- */
- lsDocumentUri scopeUri;
+ /**
+ * The scope to get the configuration section for.
+ */
+ lsDocumentUri scopeUri;
- /**
- * The configuration section asked for.
- */
- std::string section;
- MAKE_SWAP_METHOD(ConfigurationItem, scopeUri, section);
+ /**
+ * The configuration section asked for.
+ */
+ std::string section;
+ MAKE_SWAP_METHOD(ConfigurationItem, scopeUri, section);
};
MAKE_REFLECT_STRUCT(ConfigurationItem, scopeUri, section);
struct ConfigurationParams
{
- std::vector<ConfigurationItem> items;
- MAKE_SWAP_METHOD(ConfigurationParams, items)
+ std::vector<ConfigurationItem> items;
+ MAKE_SWAP_METHOD(ConfigurationParams, items)
};
MAKE_REFLECT_STRUCT(ConfigurationParams, items);
@@ -34,4 +34,4 @@ MAKE_REFLECT_STRUCT(ConfigurationParams, items);
* 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<lsp::Any>, "workspace/configuration"); \ No newline at end of file
+DEFINE_REQUEST_RESPONSE_TYPE(WorkspaceConfiguration, ConfigurationParams,std::vector<lsp::Any>, "workspace/configuration");
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h
index 78f000f30d..1c6cd83b62 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h
@@ -5,30 +5,30 @@
* The workspace folder change event.
*/
struct WorkspaceFoldersChangeEvent {
- /**
- * The array of added workspace folders
- */
+ /**
+ * The array of added workspace folders
+ */
- std::vector<WorkspaceFolder> added;
+ std::vector<WorkspaceFolder> added;
- /**
- * The array of the removed workspace folders
- */
+ /**
+ * The array of the removed workspace folders
+ */
+
+ std::vector <WorkspaceFolder> removed;
+ MAKE_SWAP_METHOD(WorkspaceFoldersChangeEvent, added, removed);
- std::vector <WorkspaceFolder> removed;
- MAKE_SWAP_METHOD(WorkspaceFoldersChangeEvent, added, removed);
-
};
MAKE_REFLECT_STRUCT(WorkspaceFoldersChangeEvent, added, removed);
struct DidChangeWorkspaceFoldersParams {
- /**
- * The actual workspace folder change event.
- */
+ /**
+ * The actual workspace folder change event.
+ */
+
+ WorkspaceFoldersChangeEvent event;
- WorkspaceFoldersChangeEvent event;
-
- MAKE_SWAP_METHOD(DidChangeWorkspaceFoldersParams, event);
+ MAKE_SWAP_METHOD(DidChangeWorkspaceFoldersParams, event);
};
MAKE_REFLECT_STRUCT(DidChangeWorkspaceFoldersParams, event);
@@ -40,8 +40,8 @@ MAKE_REFLECT_STRUCT(DidChangeWorkspaceFoldersParams, event);
* 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");
+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
index 8f8acceea4..3e7ca6dded 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/did_change_configuration.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/did_change_configuration.h
@@ -9,11 +9,11 @@
struct lsDidChangeConfigurationParams {
- /**
- * The actual changed settings.
- */
- lsp::Any settings;
- MAKE_SWAP_METHOD(lsDidChangeConfigurationParams, settings);
+ /**
+ * The actual changed settings.
+ */
+ lsp::Any settings;
+ MAKE_SWAP_METHOD(lsDidChangeConfigurationParams, settings);
};
MAKE_REFLECT_STRUCT(lsDidChangeConfigurationParams, settings);
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h
index 7cedcfa5f4..1ba33b501c 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h
@@ -5,18 +5,18 @@
#include "LibLsp/lsp/lsDocumentUri.h"
struct WorkspaceFolder {
- /**
- * The associated URI for this workspace folder.
- */
+ /**
+ * The associated URI for this workspace folder.
+ */
- lsDocumentUri uri;
+ lsDocumentUri uri;
- /**
- * The name of the workspace folder. Defaults to the uri's basename.
- */
- std::string name;
+ /**
+ * The name of the workspace folder. Defaults to the uri's basename.
+ */
+ std::string name;
- MAKE_SWAP_METHOD(WorkspaceFolder, uri, name)
+ MAKE_SWAP_METHOD(WorkspaceFolder, uri, name)
};
MAKE_REFLECT_STRUCT(WorkspaceFolder, uri, name);
@@ -29,6 +29,6 @@ MAKE_REFLECT_STRUCT(WorkspaceFolder, uri, name);
* an empty array if a workspace is open but no folders are configured,
* the workspace folders otherwise.
*/
-DEFINE_REQUEST_RESPONSE_TYPE(WorkspaceFolders,
- boost::optional<JsonNull>, boost::optional<std::vector< WorkspaceFolder>>, "workspace/workspaceFolders");
+DEFINE_REQUEST_RESPONSE_TYPE(WorkspaceFolders,
+ boost::optional<JsonNull>, boost::optional<std::vector< WorkspaceFolder>>, "workspace/workspaceFolders");
diff --git a/graphics/asymptote/LspCpp/include/optional.hpp b/graphics/asymptote/LspCpp/include/optional.hpp
deleted file mode 100644
index 86e3b407c6..0000000000
--- a/graphics/asymptote/LspCpp/include/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(<nonstd/optional.tweak.hpp>)
-# include <nonstd/optional.tweak.hpp>
-# 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 <cstddef> // 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( <optional> )
-# 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 <utility>:
-
-#if optional_CPP17_OR_GREATER
-
-#include <utility>
-
-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<T>
-#define nonstd_lite_in_place_index_t(K) std::in_place_index_t<K>
-
-#define nonstd_lite_in_place( T) std::in_place_t{}
-#define nonstd_lite_in_place_type( T) std::in_place_type_t<T>{}
-#define nonstd_lite_in_place_index(K) std::in_place_index_t<K>{}
-
-} // namespace nonstd
-
-#else // optional_CPP17_OR_GREATER
-
-#include <cstddef>
-
-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<T> /*unused*/ = detail::in_place_type_tag<T>() )
-{
- return in_place_t();
-}
-
-template< std::size_t K >
-inline in_place_t in_place( detail::in_place_index_tag<K> /*unused*/ = detail::in_place_index_tag<K>() )
-{
- return in_place_t();
-}
-
-template< class T >
-inline in_place_t in_place_type( detail::in_place_type_tag<T> /*unused*/ = detail::in_place_type_tag<T>() )
-{
- return in_place_t();
-}
-
-template< std::size_t K >
-inline in_place_t in_place_index( detail::in_place_index_tag<K> /*unused*/ = detail::in_place_index_tag<K>() )
-{
- return in_place_t();
-}
-
-// mimic templated typedef:
-
-#define nonstd_lite_in_place_t( T) nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag<T> )
-#define nonstd_lite_in_place_type_t( T) nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag<T> )
-#define nonstd_lite_in_place_index_t(K) nonstd::in_place_t(&)( nonstd::detail::in_place_index_tag<K> )
-
-#define nonstd_lite_in_place( T) nonstd::in_place_type<T>
-#define nonstd_lite_in_place_type( T) nonstd::in_place_type<T>
-#define nonstd_lite_in_place_index(K) nonstd::in_place_index<K>
-
-} // namespace nonstd
-
-#endif // optional_CPP17_OR_GREATER
-#endif // nonstd_lite_HAVE_IN_PLACE_TYPES
-
-//
-// Using std::optional:
-//
-
-#if optional_USES_STD_OPTIONAL
-
-#include <optional>
-
-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 <cassert>
-#include <utility>
-
-// 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: <cassert>
-#else
-# include <stdexcept>
-#endif
-
-#if optional_CPP11_OR_GREATER
-# include <functional>
-#endif
-
-#if optional_HAVE( INITIALIZER_LIST )
-# include <initializer_list>
-#endif
-
-#if optional_HAVE( TYPE_TRAITS )
-# include <type_traits>
-#elif optional_HAVE( TR1_TYPE_TRAITS )
-# include <tr1/type_traits>
-#endif
-
-// Method enabling
-
-#if optional_CPP11_OR_GREATER
-
-#define optional_REQUIRES_0(...) \
- template< bool B = (__VA_ARGS__), typename std::enable_if<B, int>::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<bool, B>{};
-
-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<false, T, F> { 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<T&>(), std::declval<T&>() ) ) >
- 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<T&>(), std::declval<T&>() ) );
- }
-
- template< typename T >
- static auto test( int /*unused*/ ) -> std11::integral_constant<bool, satisfies<T>()>{}
-
- template< typename >
- static auto test(...) -> std11::false_type;
-};
-
-} // namespace detail
-
-// is [nothow] swappable:
-
-template< typename T >
-struct is_swappable : decltype( detail::is_swappable::test<T>(0) ){};
-
-template< typename T >
-struct is_nothrow_swappable : decltype( detail::is_nothrow_swappable::test<T>(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<T>::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<T> ) - 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<typename List::tail, N >::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>(args)... );
- }
-
- template< class... Args >
- void emplace( Args&&... args )
- {
- ::new( value_ptr() ) value_type( std::forward<Args>(args)... );
- }
-
- template< class U, class... Args >
- void emplace( std::initializer_list<U> il, Args&&... args )
- {
- ::new( value_ptr() ) value_type( il, std::forward<Args>(args)... );
- }
-
-#endif
-
- void destruct_value()
- {
- value_ptr()->~T();
- }
-
- optional_nodiscard value_type const * value_ptr() const
- {
- return as<value_type>();
- }
-
- value_type * value_ptr()
- {
- return as<value_type>();
- }
-
- 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 <typename U>
- optional_nodiscard U * as()
- {
- return reinterpret_cast<U*>( ptr() );
- }
-
- template <typename U>
- optional_nodiscard U const * as() const
- {
- return reinterpret_cast<U const *>( 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<typename std::remove_cv<T>::type, nullopt_t>::value ),
- "T in optional<T> must not be of type 'nullopt_t'.")
-
- optional_static_assert(( !std::is_same<typename std::remove_cv<T>::type, in_place_t>::value ),
- "T in optional<T> must not be of type 'in_place_t'.")
-
- optional_static_assert(( std::is_object<T>::value && std::is_destructible<T>::value && !std::is_array<T>::value ),
- "T in optional<T> 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<U>::value
- // || std11::is_trivially_copy_constructible<U>::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<U>::value
- || std11::is_trivially_move_constructible<U>::value
- )
- >
- optional_constexpr14 optional( optional && other )
- // NOLINTNEXTLINE( performance-noexcept-move-constructor )
- noexcept( std11::is_nothrow_move_constructible<T>::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<T, U const &>::value
- && !std::is_constructible<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> const &&, T>::value
- && !std::is_convertible< U const & , T>::value /*=> explicit */
- )
- >
- explicit optional( optional<U> 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<T, U const &>::value
- && !std::is_constructible<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> 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<U> 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<T, U &&>::value
- && !std::is_constructible<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> const &&, T>::value
- && !std::is_convertible< U &&, T>::value /*=> explicit */
- )
- >
- explicit optional( optional<U> && 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<T, U &&>::value
- && !std::is_constructible<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> const &&, T>::value
- && std::is_convertible< U &&, T>::value /*=> non-explicit */
- )
- >
- // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions )
- /*non-explicit*/ optional( optional<U> && 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<T, Args&&...>::value
- )
- >
- optional_constexpr explicit optional( nonstd_lite_in_place_t(T), Args&&... args )
- : has_value_( true )
- , contained( in_place, std::forward<Args>(args)... )
- {}
-
- // 7 (C++11) - in-place construct, initializer-list
- template< typename U, typename... Args
- optional_REQUIRES_T(
- std::is_constructible<T, std::initializer_list<U>&, Args&&...>::value
- )
- >
- optional_constexpr explicit optional( nonstd_lite_in_place_t(T), std::initializer_list<U> il, Args&&... args )
- : has_value_( true )
- , contained( T( il, std::forward<Args>(args)...) )
- {}
-
- // 8a (C++11) - explicit move construct from value
- template< typename U = T
- optional_REQUIRES_T(
- std::is_constructible<T, U&&>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, nonstd_lite_in_place_t(U)>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, optional<T>>::value
- && !std::is_convertible<U&&, T>::value /*=> explicit */
- )
- >
- optional_constexpr explicit optional( U && value )
- : has_value_( true )
- , contained( nonstd_lite_in_place(T), std::forward<U>( value ) )
- {}
-
- // 8b (C++11) - non-explicit move construct from value
- template< typename U = T
- optional_REQUIRES_T(
- std::is_constructible<T, U&&>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, nonstd_lite_in_place_t(U)>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, optional<T>>::value
- && std::is_convertible<U&&, T>::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<U>( 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<T>::value
-// && std::is_copy_assignable<T>::value
- )
- operator=( optional const & other )
- noexcept(
- std11::is_nothrow_move_assignable<T>::value
- && std11::is_nothrow_move_constructible<T>::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<T>::value
-// && std::is_move_assignable<T>::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<T , U>::value
- && std11::is_assignable<T&, U>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, nonstd_lite_in_place_t(U)>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, optional<T>>::value
- && !(std::is_scalar<T>::value && std::is_same<T, typename std::decay<U>::type>::value)
- )
- operator=( U && value )
- {
- if ( has_value() )
- {
- contained.value() = std::forward<U>( value );
- }
- else
- {
- initialize( T( std::forward<U>( 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<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> const &&, T>::value
- && !std11::is_assignable< T&, optional<U> & >::value
- && !std11::is_assignable< T&, optional<U> && >::value
- && !std11::is_assignable< T&, optional<U> const & >::value
- && !std11::is_assignable< T&, optional<U> const && >::value
- )
-#else
- optional&
-#endif // optional_CPP11_OR_GREATER
- operator=( optional<U> 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<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> const &&, T>::value
- && !std11::is_assignable< T&, optional<U> & >::value
- && !std11::is_assignable< T&, optional<U> && >::value
- && !std11::is_assignable< T&, optional<U> const & >::value
- && !std11::is_assignable< T&, optional<U> const && >::value
- )
- operator=( optional<U> && other )
- {
- return *this = optional( std::move( other ) );
- }
-
- // 7 (C++11) - emplace
- template< typename... Args
- optional_REQUIRES_T(
- std::is_constructible<T, Args&&...>::value
- )
- >
- T& emplace( Args&&... args )
- {
- *this = nullopt;
- contained.emplace( std::forward<Args>(args)... );
- has_value_ = true;
- return contained.value();
- }
-
- // 8 (C++11) - emplace, initializer-list
- template< typename U, typename... Args
- optional_REQUIRES_T(
- std::is_constructible<T, std::initializer_list<U>&, Args&&...>::value
- )
- >
- T& emplace( std::initializer_list<U> il, Args&&... args )
- {
- *this = nullopt;
- contained.emplace( il, std::forward<Args>(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<T>::value
- && std17::is_nothrow_swappable<T>::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<T>(std::forward<U>( 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<T>(std::forward<U>( v ) );
-#else
- return has_value() ? std::move( contained.value() ) : static_cast<T>(std::forward<U>( v ) );
-#endif
- }
-
-#else
-
- template< typename U >
- optional_constexpr value_type value_or( U const & v ) const
- {
- return has_value() ? contained.value() : static_cast<value_type>( 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<T> const & x, optional<U> 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<T> const & x, optional<U> const & y )
-{
- return !(x == y);
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator<( optional<T> const & x, optional<U> const & y )
-{
- return (!y) ? false : (!x) ? true : *x < *y;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator>( optional<T> const & x, optional<U> const & y )
-{
- return (y < x);
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator<=( optional<T> const & x, optional<U> const & y )
-{
- return !(y < x);
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator>=( optional<T> const & x, optional<U> const & y )
-{
- return !(x < y);
-}
-
-// Comparison with nullopt
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator==( optional<T> const & x, nullopt_t /*unused*/ ) optional_noexcept
-{
- return (!x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator==( nullopt_t /*unused*/, optional<T> const & x ) optional_noexcept
-{
- return (!x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator!=( optional<T> const & x, nullopt_t /*unused*/ ) optional_noexcept
-{
- return bool(x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator!=( nullopt_t /*unused*/, optional<T> const & x ) optional_noexcept
-{
- return bool(x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator<( optional<T> const & /*unused*/, nullopt_t /*unused*/ ) optional_noexcept
-{
- return false;
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator<( nullopt_t /*unused*/, optional<T> const & x ) optional_noexcept
-{
- return bool(x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator<=( optional<T> const & x, nullopt_t /*unused*/ ) optional_noexcept
-{
- return (!x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator<=( nullopt_t /*unused*/, optional<T> const & /*unused*/ ) optional_noexcept
-{
- return true;
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator>( optional<T> const & x, nullopt_t /*unused*/ ) optional_noexcept
-{
- return bool(x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator>( nullopt_t /*unused*/, optional<T> const & /*unused*/ ) optional_noexcept
-{
- return false;
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator>=( optional<T> const & /*unused*/, nullopt_t /*unused*/ ) optional_noexcept
-{
- return true;
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator>=( nullopt_t /*unused*/, optional<T> const & x ) optional_noexcept
-{
- return (!x);
-}
-
-// Comparison with T
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator==( optional<T> 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<T> const & x )
-{
- return bool(x) ? v == *x : false;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator!=( optional<T> 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<T> const & x )
-{
- return bool(x) ? v != *x : true;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator<( optional<T> 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<T> const & x )
-{
- return bool(x) ? v < *x : false;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator<=( optional<T> 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<T> const & x )
-{
- return bool(x) ? v <= *x : false;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator>( optional<T> 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<T> const & x )
-{
- return bool(x) ? v > *x : true;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator>=( optional<T> 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<T> 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<T>::value
- && std17::is_swappable<T>::value )
-#endif
->
-void swap( optional<T> & x, optional<T> & 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<T>::type > make_optional( T && value )
-{
- return optional< typename std::decay<T>::type >( std::forward<T>( value ) );
-}
-
-template< typename T, typename...Args >
-optional_constexpr optional<T> make_optional( Args&&... args )
-{
- return optional<T>( nonstd_lite_in_place(T), std::forward<Args>(args)...);
-}
-
-template< typename T, typename U, typename... Args >
-optional_constexpr optional<T> make_optional( std::initializer_list<U> il, Args&&... args )
-{
- return optional<T>( nonstd_lite_in_place(T), il, std::forward<Args>(args)...);
-}
-
-#else
-
-template< typename T >
-optional<T> make_optional( T const & value )
-{
- return optional<T>( 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<T> >
-{
-public:
- std::size_t operator()( nonstd::optional<T> const & v ) const optional_noexcept
- {
- return bool( v ) ? std::hash<T>{}( *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/Endpoint.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp
index 3c7c275d6d..a66108d2e5 100644
--- a/graphics/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp
+++ b/graphics/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp
@@ -4,43 +4,43 @@
bool GenericEndpoint::notify(std::unique_ptr<LspMessage> 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;
+ 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_ptr<LspMessage>msg)
{
- 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;
+ 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<LspMessage> 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;
+ 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/MessageJsonHandler.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp
index 4f79312a0c..78cf8950c2 100644
--- a/graphics/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp
+++ b/graphics/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp
@@ -6,52 +6,52 @@
std::unique_ptr<LspMessage> MessageJsonHandler::parseResponseMessage(const std::string& method, Reader& r)
{
- auto findIt = method2response.find(method);
-
- if( findIt != method2response.end())
- {
- return findIt->second(r);
- }
- return nullptr;
+ auto findIt = method2response.find(method);
+
+ if( findIt != method2response.end())
+ {
+ return findIt->second(r);
+ }
+ return nullptr;
}
std::unique_ptr<LspMessage> MessageJsonHandler::parseRequstMessage(const std::string& method, Reader&r)
{
- auto findIt = method2request.find(method);
+ auto findIt = method2request.find(method);
- if (findIt != method2request.end())
- {
- return findIt->second(r);
- }
- return nullptr;
+ if (findIt != method2request.end())
+ {
+ return findIt->second(r);
+ }
+ return nullptr;
}
bool MessageJsonHandler::resovleResponseMessage(Reader&r, std::pair<std::string, std::unique_ptr<LspMessage>>& 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;
+ 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<LspMessage> MessageJsonHandler::parseNotificationMessage(const std::string& method, Reader& r)
{
- auto findIt = method2notification.find(method);
+ auto findIt = method2notification.find(method);
- if (findIt != method2notification.end())
- {
- return findIt->second(r);
- }
- return nullptr;
+ 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
index 29ff69b2e2..e8bdc073f3 100644
--- a/graphics/asymptote/LspCpp/src/jsonrpc/RemoteEndPoint.cpp
+++ b/graphics/asymptote/LspCpp/src/jsonrpc/RemoteEndPoint.cpp
@@ -14,10 +14,10 @@
#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 <atomic>
+#include <boost/asio/thread_pool.hpp>
+#include <boost/asio/post.hpp>
+
namespace lsp {
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -71,70 +71,70 @@ namespace lsp {
// 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<void()>;
-
- // We don't want a cancelable scope to "shadow" an enclosing one.
- struct CancelState {
- std::shared_ptr<std::atomic<int>> cancelled;
- const CancelState* parent = nullptr;
- lsRequestId id;
- };
- static Key<CancelState> 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<Context, Canceler> 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<std::atomic<int>>();
- 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.
+ /// A canceller requests cancellation of a task, when called.
+ /// Calling it again has no effect.
+ using Canceler = std::function<void()>;
+
+ // We don't want a cancelable scope to "shadow" an enclosing one.
+ struct CancelState {
+ std::shared_ptr<std::atomic<int>> cancelled;
+ const CancelState* parent = nullptr;
+ lsRequestId id;
+ };
+ static Key<CancelState> 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<Context, Canceler> 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<std::atomic<int>>();
+ 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<CancelMonitor> 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<std::atomic<int> > cancelled = state->cancelled;
- std::function<int()> temp = [=]{
- return cancelled->load();
- };
- return std::move(temp);
- }
-
- return {};
- }
+ boost::optional<CancelMonitor> 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<std::atomic<int> > cancelled = state->cancelled;
+ std::function<int()> temp = [=]{
+ return cancelled->load();
+ };
+ return std::move(temp);
+ }
+
+ return {};
+ }
} // namespace lsp
using namespace lsp;
class PendingRequestInfo
{
- using RequestCallBack = std::function< bool(std::unique_ptr<LspMessage>) >;
+ using RequestCallBack = std::function< bool(std::unique_ptr<LspMessage>) >;
public:
- PendingRequestInfo(const std::string& md,
- const RequestCallBack& callback);
- PendingRequestInfo(const std::string& md);
- PendingRequestInfo() {}
- std::string method;
- RequestCallBack futureInfo;
+ 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)
+ const RequestCallBack& callback) : method(_md),
+ futureInfo(callback)
{
}
@@ -143,470 +143,507 @@ 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<unsigned> m_id;
- boost::threadpool::pool tp;
- // Method calls may be cancelled by ID, so keep track of their state.
+ explicit Data(uint8_t workers,lsp::Log& _log , RemoteEndPoint* owner)
+ : max_workers(workers), m_id(0),next_request_cookie(0), message_producer(new StreamMessageProducer(*owner)), log(_log)
+ {
+
+ }
+ ~Data()
+ {
+ delete message_producer;
+ }
+ uint8_t max_workers;
+ std::atomic<int> m_id;
+ std::shared_ptr<boost::asio::thread_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<Canceler, /*Cookie*/ unsigned> > requestCancelers;
-
- std::atomic<unsigned> next_request_cookie; // To disambiguate reused IDs, see below.
- void onCancel(Notify_Cancellation::notify* notify) {
- std::lock_guard<std::mutex> 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<int>(lsErrorCodes::RequestCancelled));
- unsigned cookie;
- {
- std::lock_guard<std::mutex> 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<std::mutex> lock(request_cancelers_mutex);
- const auto& it = requestCancelers.find(id);
- if (it != requestCancelers.end() && it->second.second == cookie)
- requestCancelers.erase(it);
- }));
- }
-
- std::map <lsRequestId, std::shared_ptr<PendingRequestInfo>> _client_request_futures;
- StreamMessageProducer* message_producer;
- std::atomic<bool> quit{};
- lsp::Log& log;
- std::shared_ptr<lsp::istream> input;
- std::shared_ptr<lsp::ostream> 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<std::mutex> lock(m_requsetInfo);
- _client_request_futures[info.id] = std::make_shared<PendingRequestInfo>(info.method, handler);
-
- }
- const std::shared_ptr<const PendingRequestInfo> getRequestInfo(const lsRequestId& _id)
- {
- std::lock_guard<std::mutex> 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<std::mutex> 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<std::mutex> lock(m_requsetInfo);
- _client_request_futures.clear();
-
- }
- tp.clear();
- quit.store(true, std::memory_order_relaxed);
- }
+ mutable std::mutex request_cancelers_mutex;
+
+ std::map< lsRequestId, std::pair<Canceler, /*Cookie*/ unsigned> > requestCancelers;
+
+ std::atomic<unsigned> next_request_cookie; // To disambiguate reused IDs, see below.
+ void onCancel(Notify_Cancellation::notify* notify) {
+ std::lock_guard<std::mutex> 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<int>(lsErrorCodes::RequestCancelled));
+ unsigned cookie;
+ {
+ std::lock_guard<std::mutex> 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<std::mutex> lock(request_cancelers_mutex);
+ const auto& it = requestCancelers.find(id);
+ if (it != requestCancelers.end() && it->second.second == cookie)
+ requestCancelers.erase(it);
+ }));
+ }
+
+ std::map <lsRequestId, std::shared_ptr<PendingRequestInfo>> _client_request_futures;
+ StreamMessageProducer* message_producer;
+ std::atomic<bool> quit{};
+ lsp::Log& log;
+ std::shared_ptr<lsp::istream> input;
+ std::shared_ptr<lsp::ostream> output;
+
+ std::mutex m_requestInfo;
+
+ bool pendingRequest(RequestInMessage& info, GenericResponseHandler&& handler)
+ {
+ bool ret = true;
+ std::lock_guard<std::mutex> lock(m_requestInfo);
+ if(!info.id.has_value()){
+ auto id = getNextRequestId();
+ info.id.set(id);
+ }
+ else{
+ if(_client_request_futures.find(info.id) != _client_request_futures.end()){
+ ret = false;
+ }
+ }
+ _client_request_futures[info.id] = std::make_shared<PendingRequestInfo>(info.method, handler);
+ return ret;
+ }
+ const std::shared_ptr<const PendingRequestInfo> getRequestInfo(const lsRequestId& _id)
+ {
+ std::lock_guard<std::mutex> lock(m_requestInfo);
+ auto findIt = _client_request_futures.find(_id);
+ if (findIt != _client_request_futures.end())
+ {
+ return findIt->second;
+ }
+ return nullptr;
+ }
+
+ void removeRequestInfo(const lsRequestId& _id)
+ {
+ std::lock_guard<std::mutex> lock(m_requestInfo);
+ auto findIt = _client_request_futures.find(_id);
+ if (findIt != _client_request_futures.end())
+ {
+ _client_request_futures.erase(findIt);
+ }
+ }
+ void clear()
+ {
+ {
+ std::lock_guard<std::mutex> lock(m_requestInfo);
+ _client_request_futures.clear();
+ }
+ if(tp){
+ tp->stop();
+ }
+ quit.store(true, std::memory_order_relaxed);
+ }
+
+ int getNextRequestId()
+ {
+ return m_id.fetch_add(1, std::memory_order_relaxed);
+ }
};
namespace
{
void WriterMsg(std::shared_ptr<lsp::ostream>& 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();
+ 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("id"))
+ {
+ return false;
+ }
- if (!visitor.HasMember("result") && !visitor.HasMember("error"))
- {
- return false;
- }
+ if (!visitor.HasMember("result") && !visitor.HasMember("error"))
+ {
+ return false;
+ }
- return true;
+ 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;
+ 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;
+ 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;
- };
+ 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)
+ const std::shared_ptr < MessageJsonHandler >& json_handler,const std::shared_ptr < Endpoint>& localEndPoint, lsp::Log& _log, uint8_t max_workers):
+ d_ptr(new Data(max_workers,_log,this)),jsonHandler(json_handler), local_endpoint(localEndPoint)
{
- jsonHandler->method2notification[Notify_Cancellation::notify::kMethodInfo] = [](Reader& visitor)
- {
- return Notify_Cancellation::notify::ReflectReader(visitor);
- };
+ 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->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);
+ 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<std::string, std::unique_ptr<LspMessage>> 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;
+ 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::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)
+bool RemoteEndPoint::internalSendRequest(RequestInMessage& info, GenericResponseHandler handler)
{
- std::lock_guard<std::mutex> 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::lock_guard<std::mutex> 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::WARNING, desc);
+ return false;
+ }
+ if(!d_ptr->pendingRequest(info, std::move(handler)))
+ {
+ std::string desc = "Duplicate id which of request:";
+ desc += info.ToJson();
+ desc += "\n";
+ d_ptr->log.log(Log::Level::WARNING, desc);
+ }
+ WriterMsg(d_ptr->output, info);
+ return true;
}
-
+int RemoteEndPoint::getNextRequestId(){
+ return d_ptr->getNextRequestId();
+}
+bool RemoteEndPoint::cancelRequest(const lsRequestId& id){
+ if(!isWorking()){
+ return false;
+ }
+ auto msgInfo = d_ptr->getRequestInfo(id);
+ if (msgInfo){
+ Notify_Cancellation::notify cancel_notify;
+ cancel_notify.params.id = id;
+ send(cancel_notify);
+ return true;
+ }
+ return false;
+}
std::unique_ptr<LspMessage> RemoteEndPoint::internalWaitResponse(RequestInMessage& request, unsigned time_out)
{
- auto eventFuture = std::make_shared< Condition< LspMessage > >();
- internalSendRequest(request, [=](std::unique_ptr<LspMessage> data)
- {
- eventFuture->notify(std::move(data));
- return true;
- });
- return eventFuture->wait(time_out);
+ auto eventFuture = std::make_shared< Condition< LspMessage > >();
+ internalSendRequest(request, [=](std::unique_ptr<LspMessage> data)
+ {
+ eventFuture->notify(std::move(data));
+ return true;
+ });
+ return eventFuture->wait(time_out);
}
void RemoteEndPoint::mainLoop(std::unique_ptr<LspMessage>msg)
{
- if(d_ptr->quit.load(std::memory_order_relaxed))
- {
- return;
- }
- const auto _kind = msg->GetKid();
- if (_kind == LspMessage::REQUEST_MESSAGE)
- {
- auto req = static_cast<RequestInMessage*>(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<ResponseInMessage*>(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<Notify_Cancellation::notify*>(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);
- }
+ if(d_ptr->quit.load(std::memory_order_relaxed))
+ {
+ return;
+ }
+ const auto _kind = msg->GetKid();
+ if (_kind == LspMessage::REQUEST_MESSAGE)
+ {
+ auto req = static_cast<RequestInMessage*>(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)
+ {
+ const auto id = static_cast<ResponseInMessage*>(msg.get())->id;
+ auto msgInfo = d_ptr->getRequestInfo(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(id);
+ }
+ }
+ else if (_kind == LspMessage::NOTIFICATION_MESSAGE)
+ {
+ if (strcmp(Notify_Cancellation::notify::kMethodInfo, msg->GetMethodType())==0)
+ {
+ d_ptr->onCancel(static_cast<Notify_Cancellation::notify*>(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<MessageIssue>&& issue)
{
- for(auto& it : issue)
- {
- d_ptr->log.log(it.code, it.text);
- }
+ 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);
+ d_ptr->log.log(issue.code, issue.text);
}
void RemoteEndPoint::startProcessingMessages(std::shared_ptr<lsp::istream> r,
- std::shared_ptr<lsp::ostream> w)
+ std::shared_ptr<lsp::ostream> 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<std::thread>([&]()
+ d_ptr->quit.store(false, std::memory_order_relaxed);
+ d_ptr->input = r;
+ d_ptr->output = w;
+ d_ptr->message_producer->bind(r);
+ d_ptr->tp = std::make_shared<boost::asio::thread_pool>(d_ptr->max_workers);
+ message_producer_thread_ = std::make_shared<std::thread>([&]()
{
- d_ptr->message_producer->listen([&](std::string&& content){
- const auto temp = std::make_shared<std::string>(std::move(content));
- d_ptr->tp.schedule([this, temp]{
+ d_ptr->message_producer->listen([&](std::string&& content){
+ const auto temp = std::make_shared<std::string>(std::move(content));
+ boost::asio::post(*d_ptr->tp,
+ [this, temp]{
#ifdef USEGC
GCThreadContext gcContext;
#endif
- dispatch(*temp);
- });
- });
- });
+ dispatch(*temp);
+ });
+ });
+ });
}
-void RemoteEndPoint::Stop()
+void RemoteEndPoint::stop()
{
- if(message_producer_thread_ && message_producer_thread_->joinable())
- {
- message_producer_thread_->detach();
- }
- d_ptr->clear();
+ if(message_producer_thread_ && message_producer_thread_->joinable())
+ {
+ message_producer_thread_->detach();
+ message_producer_thread_ = nullptr;
+ }
+ d_ptr->clear();
}
void RemoteEndPoint::sendMsg( LspMessage& msg)
{
- std::lock_guard<std::mutex> 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);
+ std::lock_guard<std::mutex> 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);
+
+}
+bool RemoteEndPoint::isWorking() const {
+ if (message_producer_thread_ && message_producer_thread_->joinable())
+ return true;
+ return false;
}
diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/StreamMessageProducer.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/StreamMessageProducer.cpp
index 119e9040bd..cc14d62076 100644
--- a/graphics/asymptote/LspCpp/src/jsonrpc/StreamMessageProducer.cpp
+++ b/graphics/asymptote/LspCpp/src/jsonrpc/StreamMessageProducer.cpp
@@ -7,185 +7,185 @@
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());
+ 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";
+ 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);
- }
- }
+ 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;
- }
- }
- }
+ 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<lsp::istream>_in)
{
- input = _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;
+ // 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
index 37a7a3a3af..799d0aec9a 100644
--- a/graphics/asymptote/LspCpp/src/jsonrpc/TcpServer.cpp
+++ b/graphics/asymptote/LspCpp/src/jsonrpc/TcpServer.cpp
@@ -11,39 +11,39 @@
namespace lsp {
- struct tcp_connect_session;
+ struct tcp_connect_session;
- class tcp_stream_wrapper :public istream, public ostream
- {
- public:
- tcp_stream_wrapper(tcp_connect_session& _w);
+ class tcp_stream_wrapper :public istream, public ostream
+ {
+ public:
+ tcp_stream_wrapper(tcp_connect_session& _w);
- tcp_connect_session& session;
- std::atomic<bool> quit{};
- std::shared_ptr < MultiQueueWaiter> request_waiter;
- ThreadedQueue< char > on_request;
+ tcp_connect_session& session;
+ std::atomic<bool> quit{};
+ std::shared_ptr < MultiQueueWaiter> request_waiter;
+ ThreadedQueue< char > on_request;
std::string error_message;
- bool fail() override
- {
- return bad();
- }
+ bool fail() override
+ {
+ return bad();
+ }
- bool eof() override
- {
- return bad();
- }
- bool good() override
- {
- return !bad();
- }
- tcp_stream_wrapper& read(char* str, std::streamsize count)
+ 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<size_t>( count ));
memcpy(str,some.data(),some.size());
for (std::streamsize i = some.size(); i < count; ++i)
@@ -51,41 +51,41 @@ namespace lsp {
str[i] = static_cast<char>(get());
}
- return *this;
- }
- int get() override
- {
- return on_request.Dequeue();
- }
+ return *this;
+ }
+ int get() override
+ {
+ return on_request.Dequeue();
+ }
- bool bad() override;
+ bool bad() override;
- tcp_stream_wrapper& write(const std::string& c) override;
+ tcp_stream_wrapper& write(const std::string& c) override;
- tcp_stream_wrapper& write(std::streamsize _s) override;
+ tcp_stream_wrapper& write(std::streamsize _s) override;
- tcp_stream_wrapper& flush() override
- {
- return *this;
- }
- void reset_state()
- {
- return;
- }
+ tcp_stream_wrapper& flush() override
+ {
+ return *this;
+ }
+ void reset_state()
+ {
+ return;
+ }
- void clear() override
- {
+ void clear() override
+ {
- }
+ }
- std::string what() override;
- bool need_to_clear_the_state() override
- {
+ std::string what() override;
+ bool need_to_clear_the_state() override
+ {
return false;
- }
- };
- struct tcp_connect_session:std::enable_shared_from_this<tcp_connect_session>
- {
+ }
+ };
+ struct tcp_connect_session:std::enable_shared_from_this<tcp_connect_session>
+ {
/// Buffer for incoming data.
std::array<unsigned char, 8192> buffer_;
boost::asio::ip::tcp::socket socket_;
@@ -93,7 +93,7 @@ namespace lsp {
boost::asio::io_context::strand strand_;
std::shared_ptr<tcp_stream_wrapper> 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))
+ : socket_(std::move(_socket)), strand_(io_context), proxy_(new tcp_stream_wrapper(*this))
{
do_read();
}
@@ -127,22 +127,22 @@ namespace lsp {
}));
}
- };
+ };
- tcp_stream_wrapper::tcp_stream_wrapper(tcp_connect_session& _w): session(_w)
- {
- }
+ tcp_stream_wrapper::tcp_stream_wrapper(tcp_connect_session& _w): session(_w)
+ {
+ }
- bool tcp_stream_wrapper::bad()
+ 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(const std::string& c)
+ {
+ session.do_write(c);
+ return *this;
+ }
tcp_stream_wrapper& tcp_stream_wrapper::write(std::streamsize _s)
{
@@ -150,8 +150,8 @@ namespace lsp {
return *this;
}
- std::string tcp_stream_wrapper::what()
- {
+ std::string tcp_stream_wrapper::what()
+ {
if (error_message.size())
return error_message;
@@ -159,21 +159,21 @@ namespace lsp {
{
return "Socket is not open.";
}
- return {};
- }
+ return {};
+ }
struct TcpServer::Data
{
Data(
lsp::Log& log, uint32_t _max_workers) :
- acceptor_(io_context_), _log(log)
- {
- }
+ acceptor_(io_context_), _log(log)
+ {
+ }
- ~Data()
- {
+ ~Data()
+ {
- }
+ }
/// The io_context used to perform asynchronous operations.
boost::asio::io_context io_context_;
@@ -187,10 +187,10 @@ namespace lsp {
};
- TcpServer::~TcpServer()
- {
+ TcpServer::~TcpServer()
+ {
delete d_ptr;
- }
+ }
TcpServer::TcpServer(const std::string& address, const std::string& port,
std::shared_ptr < MessageJsonHandler> json_handler,
@@ -238,7 +238,7 @@ namespace lsp {
{
try
{
- if(d_ptr->work)
+ if(d_ptr->work)
d_ptr->work.reset();
do_stop();
@@ -262,17 +262,17 @@ namespace lsp {
if (!ec)
{
- if(d_ptr->_connect_session)
- {
- if(d_ptr->_connect_session->socket_.is_open())
- {
+ 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();
- }
+ point.stop();
+ }
auto local_point = socket.local_endpoint();
std::string desc = ("New client " + local_point.address().to_string() + " connect.");
@@ -289,7 +289,7 @@ namespace lsp {
{
d_ptr->acceptor_.close();
- point.Stop();
+ point.stop();
}
diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/WebSocketServer.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/WebSocketServer.cpp
index 127cf2a9f4..80806e848b 100644
--- a/graphics/asymptote/LspCpp/src/jsonrpc/WebSocketServer.cpp
+++ b/graphics/asymptote/LspCpp/src/jsonrpc/WebSocketServer.cpp
@@ -115,29 +115,29 @@ namespace lsp {
void close()
{
- if(ws_.is_open())
- {
- boost::system::error_code ec;
- ws_.close(websocket::close_code::normal, ec);
- }
+ if(ws_.is_open())
+ {
+ boost::system::error_code ec;
+ ws_.close(websocket::close_code::normal, ec);
+ }
}
};
//------------------------------------------------------------------------------
- struct WebSocketServer::Data
- {
+ struct WebSocketServer::Data
+ {
Data(const std::string& user_agent, lsp::Log& log) :
- acceptor_(io_context_), user_agent_(user_agent), _log(log)
+ acceptor_(io_context_), user_agent_(user_agent), _log(log)
- {
- }
+ {
+ }
- ~Data()
- {
+ ~Data()
+ {
- }
+ }
/// The io_context used to perform asynchronous operations.
boost::asio::io_context io_context_;
@@ -151,68 +151,68 @@ namespace lsp {
std::string user_agent_;
lsp::Log& _log;
- };
+ };
websocket_stream_wrapper::websocket_stream_wrapper(boost::beast::websocket::stream<boost::beast::tcp_stream>& _w):
- ws_(_w), request_waiter(new MultiQueueWaiter()),
- on_request(request_waiter)
+ ws_(_w), request_waiter(new MultiQueueWaiter()),
+ on_request(request_waiter)
{
}
bool websocket_stream_wrapper::fail()
{
- return bad();
+ return bad();
}
bool websocket_stream_wrapper::eof()
{
- return bad();
+ return bad();
}
bool websocket_stream_wrapper::good()
{
- return !bad();
+ return !bad();
}
websocket_stream_wrapper& websocket_stream_wrapper::read(char* str, std::streamsize count)
{
- auto some = on_request.TryDequeueSome(static_cast<size_t>(count));
+ auto some = on_request.TryDequeueSome(static_cast<size_t>(count));
memcpy(str,some.data(),some.size());
for (std::streamsize i = some.size(); i < count; ++i)
{
str[i] = static_cast<char>(get());
}
- return *this;
+ return *this;
}
int websocket_stream_wrapper::get()
{
- return on_request.Dequeue();
+ return on_request.Dequeue();
}
bool websocket_stream_wrapper::bad()
{
- return !ws_.next_layer().socket().is_open();
+ 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;
+ 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;
+ std::ostringstream temp;
+ temp << _s;
+ ws_.write(boost::asio::buffer(temp.str()));
+ return *this;
}
websocket_stream_wrapper& websocket_stream_wrapper::flush()
{
- return *this;
+ return *this;
}
void websocket_stream_wrapper::clear()
@@ -224,17 +224,17 @@ namespace lsp {
if (!error_message.empty())
return error_message;
- if (!ws_.next_layer().socket().is_open())
- {
- return "Socket is not open.";
- }
- return {};
+ 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,
@@ -282,7 +282,7 @@ namespace lsp {
{
try
{
- if(d_ptr->work)
+ if(d_ptr->work)
d_ptr->work.reset();
do_stop();
@@ -305,17 +305,17 @@ namespace lsp {
}
if (!ec)
{
- if(d_ptr->_server_session)
- {
- try
- {
+ if(d_ptr->_server_session)
+ {
+ try
+ {
d_ptr->_server_session->close();
- point.Stop();
- }
- catch (...)
- {
- }
- }
+ point.stop();
+ }
+ catch (...)
+ {
+ }
+ }
d_ptr->_server_session = std::make_shared<server_session>(std::move(socket), d_ptr->user_agent_);
d_ptr->_server_session->run();
@@ -330,7 +330,7 @@ namespace lsp {
{
d_ptr->acceptor_.close();
- point.Stop();
+ point.stop();
}
diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/message.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/message.cpp
index 4a23d2016a..a9e7736cd7 100644
--- a/graphics/asymptote/LspCpp/src/jsonrpc/message.cpp
+++ b/graphics/asymptote/LspCpp/src/jsonrpc/message.cpp
@@ -8,81 +8,81 @@
#include "LibLsp/JsonRpc/json.h"
void LspMessage::Write(std::ostream& out) {
- rapidjson::StringBuffer output;
- rapidjson::Writer<rapidjson::StringBuffer> writer(output);
- JsonWriter json_writer{ &writer };
- ReflectWriter(json_writer);
+ rapidjson::StringBuffer output;
+ rapidjson::Writer<rapidjson::StringBuffer> 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();
+ 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<rapidjson::StringBuffer> writer(output);
- JsonWriter json_writer{ &writer };
- this->ReflectWriter(json_writer);
- return output.GetString();
+ rapidjson::StringBuffer output;
+ rapidjson::Writer<rapidjson::StringBuffer> 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<int>(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;
- }
+ 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<int>(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;
- }
+ 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 "";
+ 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
deleted file mode 100644
index 86e3b407c6..0000000000
--- a/graphics/asymptote/LspCpp/src/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(<nonstd/optional.tweak.hpp>)
-# include <nonstd/optional.tweak.hpp>
-# 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 <cstddef> // 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( <optional> )
-# 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 <utility>:
-
-#if optional_CPP17_OR_GREATER
-
-#include <utility>
-
-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<T>
-#define nonstd_lite_in_place_index_t(K) std::in_place_index_t<K>
-
-#define nonstd_lite_in_place( T) std::in_place_t{}
-#define nonstd_lite_in_place_type( T) std::in_place_type_t<T>{}
-#define nonstd_lite_in_place_index(K) std::in_place_index_t<K>{}
-
-} // namespace nonstd
-
-#else // optional_CPP17_OR_GREATER
-
-#include <cstddef>
-
-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<T> /*unused*/ = detail::in_place_type_tag<T>() )
-{
- return in_place_t();
-}
-
-template< std::size_t K >
-inline in_place_t in_place( detail::in_place_index_tag<K> /*unused*/ = detail::in_place_index_tag<K>() )
-{
- return in_place_t();
-}
-
-template< class T >
-inline in_place_t in_place_type( detail::in_place_type_tag<T> /*unused*/ = detail::in_place_type_tag<T>() )
-{
- return in_place_t();
-}
-
-template< std::size_t K >
-inline in_place_t in_place_index( detail::in_place_index_tag<K> /*unused*/ = detail::in_place_index_tag<K>() )
-{
- return in_place_t();
-}
-
-// mimic templated typedef:
-
-#define nonstd_lite_in_place_t( T) nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag<T> )
-#define nonstd_lite_in_place_type_t( T) nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag<T> )
-#define nonstd_lite_in_place_index_t(K) nonstd::in_place_t(&)( nonstd::detail::in_place_index_tag<K> )
-
-#define nonstd_lite_in_place( T) nonstd::in_place_type<T>
-#define nonstd_lite_in_place_type( T) nonstd::in_place_type<T>
-#define nonstd_lite_in_place_index(K) nonstd::in_place_index<K>
-
-} // namespace nonstd
-
-#endif // optional_CPP17_OR_GREATER
-#endif // nonstd_lite_HAVE_IN_PLACE_TYPES
-
-//
-// Using std::optional:
-//
-
-#if optional_USES_STD_OPTIONAL
-
-#include <optional>
-
-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 <cassert>
-#include <utility>
-
-// 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: <cassert>
-#else
-# include <stdexcept>
-#endif
-
-#if optional_CPP11_OR_GREATER
-# include <functional>
-#endif
-
-#if optional_HAVE( INITIALIZER_LIST )
-# include <initializer_list>
-#endif
-
-#if optional_HAVE( TYPE_TRAITS )
-# include <type_traits>
-#elif optional_HAVE( TR1_TYPE_TRAITS )
-# include <tr1/type_traits>
-#endif
-
-// Method enabling
-
-#if optional_CPP11_OR_GREATER
-
-#define optional_REQUIRES_0(...) \
- template< bool B = (__VA_ARGS__), typename std::enable_if<B, int>::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<bool, B>{};
-
-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<false, T, F> { 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<T&>(), std::declval<T&>() ) ) >
- 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<T&>(), std::declval<T&>() ) );
- }
-
- template< typename T >
- static auto test( int /*unused*/ ) -> std11::integral_constant<bool, satisfies<T>()>{}
-
- template< typename >
- static auto test(...) -> std11::false_type;
-};
-
-} // namespace detail
-
-// is [nothow] swappable:
-
-template< typename T >
-struct is_swappable : decltype( detail::is_swappable::test<T>(0) ){};
-
-template< typename T >
-struct is_nothrow_swappable : decltype( detail::is_nothrow_swappable::test<T>(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<T>::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<T> ) - 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<typename List::tail, N >::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>(args)... );
- }
-
- template< class... Args >
- void emplace( Args&&... args )
- {
- ::new( value_ptr() ) value_type( std::forward<Args>(args)... );
- }
-
- template< class U, class... Args >
- void emplace( std::initializer_list<U> il, Args&&... args )
- {
- ::new( value_ptr() ) value_type( il, std::forward<Args>(args)... );
- }
-
-#endif
-
- void destruct_value()
- {
- value_ptr()->~T();
- }
-
- optional_nodiscard value_type const * value_ptr() const
- {
- return as<value_type>();
- }
-
- value_type * value_ptr()
- {
- return as<value_type>();
- }
-
- 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 <typename U>
- optional_nodiscard U * as()
- {
- return reinterpret_cast<U*>( ptr() );
- }
-
- template <typename U>
- optional_nodiscard U const * as() const
- {
- return reinterpret_cast<U const *>( 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<typename std::remove_cv<T>::type, nullopt_t>::value ),
- "T in optional<T> must not be of type 'nullopt_t'.")
-
- optional_static_assert(( !std::is_same<typename std::remove_cv<T>::type, in_place_t>::value ),
- "T in optional<T> must not be of type 'in_place_t'.")
-
- optional_static_assert(( std::is_object<T>::value && std::is_destructible<T>::value && !std::is_array<T>::value ),
- "T in optional<T> 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<U>::value
- // || std11::is_trivially_copy_constructible<U>::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<U>::value
- || std11::is_trivially_move_constructible<U>::value
- )
- >
- optional_constexpr14 optional( optional && other )
- // NOLINTNEXTLINE( performance-noexcept-move-constructor )
- noexcept( std11::is_nothrow_move_constructible<T>::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<T, U const &>::value
- && !std::is_constructible<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> const &&, T>::value
- && !std::is_convertible< U const & , T>::value /*=> explicit */
- )
- >
- explicit optional( optional<U> 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<T, U const &>::value
- && !std::is_constructible<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> 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<U> 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<T, U &&>::value
- && !std::is_constructible<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> const &&, T>::value
- && !std::is_convertible< U &&, T>::value /*=> explicit */
- )
- >
- explicit optional( optional<U> && 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<T, U &&>::value
- && !std::is_constructible<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> const &&, T>::value
- && std::is_convertible< U &&, T>::value /*=> non-explicit */
- )
- >
- // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions )
- /*non-explicit*/ optional( optional<U> && 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<T, Args&&...>::value
- )
- >
- optional_constexpr explicit optional( nonstd_lite_in_place_t(T), Args&&... args )
- : has_value_( true )
- , contained( in_place, std::forward<Args>(args)... )
- {}
-
- // 7 (C++11) - in-place construct, initializer-list
- template< typename U, typename... Args
- optional_REQUIRES_T(
- std::is_constructible<T, std::initializer_list<U>&, Args&&...>::value
- )
- >
- optional_constexpr explicit optional( nonstd_lite_in_place_t(T), std::initializer_list<U> il, Args&&... args )
- : has_value_( true )
- , contained( T( il, std::forward<Args>(args)...) )
- {}
-
- // 8a (C++11) - explicit move construct from value
- template< typename U = T
- optional_REQUIRES_T(
- std::is_constructible<T, U&&>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, nonstd_lite_in_place_t(U)>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, optional<T>>::value
- && !std::is_convertible<U&&, T>::value /*=> explicit */
- )
- >
- optional_constexpr explicit optional( U && value )
- : has_value_( true )
- , contained( nonstd_lite_in_place(T), std::forward<U>( value ) )
- {}
-
- // 8b (C++11) - non-explicit move construct from value
- template< typename U = T
- optional_REQUIRES_T(
- std::is_constructible<T, U&&>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, nonstd_lite_in_place_t(U)>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, optional<T>>::value
- && std::is_convertible<U&&, T>::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<U>( 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<T>::value
-// && std::is_copy_assignable<T>::value
- )
- operator=( optional const & other )
- noexcept(
- std11::is_nothrow_move_assignable<T>::value
- && std11::is_nothrow_move_constructible<T>::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<T>::value
-// && std::is_move_assignable<T>::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<T , U>::value
- && std11::is_assignable<T&, U>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, nonstd_lite_in_place_t(U)>::value
- && !std::is_same<typename std20::remove_cvref<U>::type, optional<T>>::value
- && !(std::is_scalar<T>::value && std::is_same<T, typename std::decay<U>::type>::value)
- )
- operator=( U && value )
- {
- if ( has_value() )
- {
- contained.value() = std::forward<U>( value );
- }
- else
- {
- initialize( T( std::forward<U>( 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<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> const &&, T>::value
- && !std11::is_assignable< T&, optional<U> & >::value
- && !std11::is_assignable< T&, optional<U> && >::value
- && !std11::is_assignable< T&, optional<U> const & >::value
- && !std11::is_assignable< T&, optional<U> const && >::value
- )
-#else
- optional&
-#endif // optional_CPP11_OR_GREATER
- operator=( optional<U> 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<T, optional<U> & >::value
- && !std::is_constructible<T, optional<U> && >::value
- && !std::is_constructible<T, optional<U> const & >::value
- && !std::is_constructible<T, optional<U> const && >::value
- && !std::is_convertible< optional<U> & , T>::value
- && !std::is_convertible< optional<U> && , T>::value
- && !std::is_convertible< optional<U> const & , T>::value
- && !std::is_convertible< optional<U> const &&, T>::value
- && !std11::is_assignable< T&, optional<U> & >::value
- && !std11::is_assignable< T&, optional<U> && >::value
- && !std11::is_assignable< T&, optional<U> const & >::value
- && !std11::is_assignable< T&, optional<U> const && >::value
- )
- operator=( optional<U> && other )
- {
- return *this = optional( std::move( other ) );
- }
-
- // 7 (C++11) - emplace
- template< typename... Args
- optional_REQUIRES_T(
- std::is_constructible<T, Args&&...>::value
- )
- >
- T& emplace( Args&&... args )
- {
- *this = nullopt;
- contained.emplace( std::forward<Args>(args)... );
- has_value_ = true;
- return contained.value();
- }
-
- // 8 (C++11) - emplace, initializer-list
- template< typename U, typename... Args
- optional_REQUIRES_T(
- std::is_constructible<T, std::initializer_list<U>&, Args&&...>::value
- )
- >
- T& emplace( std::initializer_list<U> il, Args&&... args )
- {
- *this = nullopt;
- contained.emplace( il, std::forward<Args>(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<T>::value
- && std17::is_nothrow_swappable<T>::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<T>(std::forward<U>( 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<T>(std::forward<U>( v ) );
-#else
- return has_value() ? std::move( contained.value() ) : static_cast<T>(std::forward<U>( v ) );
-#endif
- }
-
-#else
-
- template< typename U >
- optional_constexpr value_type value_or( U const & v ) const
- {
- return has_value() ? contained.value() : static_cast<value_type>( 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<T> const & x, optional<U> 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<T> const & x, optional<U> const & y )
-{
- return !(x == y);
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator<( optional<T> const & x, optional<U> const & y )
-{
- return (!y) ? false : (!x) ? true : *x < *y;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator>( optional<T> const & x, optional<U> const & y )
-{
- return (y < x);
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator<=( optional<T> const & x, optional<U> const & y )
-{
- return !(y < x);
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator>=( optional<T> const & x, optional<U> const & y )
-{
- return !(x < y);
-}
-
-// Comparison with nullopt
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator==( optional<T> const & x, nullopt_t /*unused*/ ) optional_noexcept
-{
- return (!x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator==( nullopt_t /*unused*/, optional<T> const & x ) optional_noexcept
-{
- return (!x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator!=( optional<T> const & x, nullopt_t /*unused*/ ) optional_noexcept
-{
- return bool(x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator!=( nullopt_t /*unused*/, optional<T> const & x ) optional_noexcept
-{
- return bool(x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator<( optional<T> const & /*unused*/, nullopt_t /*unused*/ ) optional_noexcept
-{
- return false;
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator<( nullopt_t /*unused*/, optional<T> const & x ) optional_noexcept
-{
- return bool(x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator<=( optional<T> const & x, nullopt_t /*unused*/ ) optional_noexcept
-{
- return (!x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator<=( nullopt_t /*unused*/, optional<T> const & /*unused*/ ) optional_noexcept
-{
- return true;
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator>( optional<T> const & x, nullopt_t /*unused*/ ) optional_noexcept
-{
- return bool(x);
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator>( nullopt_t /*unused*/, optional<T> const & /*unused*/ ) optional_noexcept
-{
- return false;
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator>=( optional<T> const & /*unused*/, nullopt_t /*unused*/ ) optional_noexcept
-{
- return true;
-}
-
-template< typename T >
-optional_nodiscard optional_constexpr bool operator>=( nullopt_t /*unused*/, optional<T> const & x ) optional_noexcept
-{
- return (!x);
-}
-
-// Comparison with T
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator==( optional<T> 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<T> const & x )
-{
- return bool(x) ? v == *x : false;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator!=( optional<T> 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<T> const & x )
-{
- return bool(x) ? v != *x : true;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator<( optional<T> 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<T> const & x )
-{
- return bool(x) ? v < *x : false;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator<=( optional<T> 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<T> const & x )
-{
- return bool(x) ? v <= *x : false;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator>( optional<T> 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<T> const & x )
-{
- return bool(x) ? v > *x : true;
-}
-
-template< typename T, typename U >
-optional_nodiscard optional_constexpr bool operator>=( optional<T> 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<T> 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<T>::value
- && std17::is_swappable<T>::value )
-#endif
->
-void swap( optional<T> & x, optional<T> & 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<T>::type > make_optional( T && value )
-{
- return optional< typename std::decay<T>::type >( std::forward<T>( value ) );
-}
-
-template< typename T, typename...Args >
-optional_constexpr optional<T> make_optional( Args&&... args )
-{
- return optional<T>( nonstd_lite_in_place(T), std::forward<Args>(args)...);
-}
-
-template< typename T, typename U, typename... Args >
-optional_constexpr optional<T> make_optional( std::initializer_list<U> il, Args&&... args )
-{
- return optional<T>( nonstd_lite_in_place(T), il, std::forward<Args>(args)...);
-}
-
-#else
-
-template< typename T >
-optional<T> make_optional( T const & value )
-{
- return optional<T>( 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<T> >
-{
-public:
- std::size_t operator()( nonstd::optional<T> const & v ) const optional_noexcept
- {
- return bool( v ) ? std::hash<T>{}( *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
index 526dcc8884..8c5beba83e 100644
--- a/graphics/asymptote/LspCpp/src/jsonrpc/serializer.cpp
+++ b/graphics/asymptote/LspCpp/src/jsonrpc/serializer.cpp
@@ -148,67 +148,67 @@ void Reflect(Writer& visitor, SerializeFormat& value) {
std::string JsonReader::ToString() const
{
- rapidjson::StringBuffer strBuf;
- strBuf.Clear();
- rapidjson::Writer<rapidjson::StringBuffer> writer(strBuf);
- m_->Accept(writer);
- std::string strJson = strBuf.GetString();
- return strJson;
+ rapidjson::StringBuffer strBuf;
+ strBuf.Clear();
+ rapidjson::Writer<rapidjson::StringBuffer> writer(strBuf);
+ m_->Accept(writer);
+ std::string strJson = strBuf.GetString();
+ return strJson;
}
void JsonReader::IterMap(std::function<void(const char*, Reader&)> fn)
{
- path_.push_back("0");
- for (auto& entry : m_->GetObject())
- {
- auto saved = m_;
- m_ = &(entry.value);
+ 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();
+ fn(entry.name.GetString(), *this);
+ m_ = saved;
+ }
+ path_.pop_back();
}
void JsonReader::IterArray(std::function<void(Reader&)> 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();
+ 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<void(Reader&)> 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();
+ 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;
+ std::string ret;
+ for (auto& t : path_)
+ {
+ ret += '/';
+ ret += t;
+ }
+ ret.pop_back();
+ return ret;
}
diff --git a/graphics/asymptote/LspCpp/src/lsp/Markup.cpp b/graphics/asymptote/LspCpp/src/lsp/Markup.cpp
index 97860d969d..f22baac95d 100644
--- a/graphics/asymptote/LspCpp/src/lsp/Markup.cpp
+++ b/graphics/asymptote/LspCpp/src/lsp/Markup.cpp
@@ -17,7 +17,7 @@
#include <boost/algorithm/string.hpp>
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) {
@@ -93,7 +93,7 @@ namespace lsp {
inline bool isASCII(std::string_ref S) {
for (char C : S)
{
- if(!isASCII(C))return true;
+ if(!isASCII(C))return true;
}
return true;
}
@@ -465,7 +465,7 @@ bool looksLikeTag(std::string_ref& Contents) {
// 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;
@@ -541,10 +541,10 @@ bool needsLeadingEscape(char C, std::string_ref Before, std::string_ref After,
{
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 lsp::isDigit(c);
});
}
return std::all_of(Content.begin(), Content.end(), [](char c)
@@ -633,12 +633,12 @@ bool needsLeadingEscape(char C, std::string_ref Before, std::string_ref After,
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<std::string_ref> Words;
SplitString(Input, Words);
-
+
return lsp::join(Words, " ");
}
@@ -649,13 +649,13 @@ bool needsLeadingEscape(char C, std::string_ref Before, std::string_ref After,
std::ostringstream OS(R);
std::vector<int> v{ 1, 2, 3 };
-
+
// Trim rulers.
Children.erase(std::remove_if(Children.begin(), Children.end(), [](const Block* C)
- {
- return C->isRuler();
- }), Children.end());
-
+ {
+ return C->isRuler();
+ }), Children.end());
+
bool LastBlockWasRuler = true;
for (const auto& C : Children) {
if (C->isRuler() && LastBlockWasRuler)
@@ -685,10 +685,10 @@ bool needsLeadingEscape(char C, std::string_ref Before, std::string_ref After,
void (Block::* renderFunc)(std::ostringstream&) const)
{
std::vector<Block*> temp(children.size(), nullptr);
- for(size_t i = 0 ; i < children.size() ; ++i)
- {
+ 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
@@ -729,7 +729,7 @@ public:
: Contents(std::move(Contents)), Language(std::move(Language)) {}
private:
-
+
std::string_ref Contents;
std::string_ref Language;
};
@@ -939,4 +939,4 @@ private:
Children.emplace_back(std::make_unique<Heading>(Level));
return *static_cast<Paragraph*>(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
index 57adb7e497..02c61e67a5 100644
--- a/graphics/asymptote/LspCpp/src/lsp/ParentProcessWatcher.cpp
+++ b/graphics/asymptote/LspCpp/src/lsp/ParentProcessWatcher.cpp
@@ -18,89 +18,89 @@ using namespace std;
struct ParentProcessWatcher::ParentProcessWatcherData : std::enable_shared_from_this<ParentProcessWatcherData>
{
- std::unique_ptr<SimpleTimer<boost::posix_time::seconds>> timer;
- lsp::Log& _log;
- std::function<void()> 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<boost::process::child> c;
+ std::unique_ptr<SimpleTimer<boost::posix_time::seconds>> timer;
+ lsp::Log& _log;
+ std::function<void()> 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<boost::process::child> c;
- ParentProcessWatcherData(lsp::Log& log, int _pid,
- const std::function<void()>&& callback, uint32_t poll_delay_secs) :
- _log(log), on_exit(callback), pid(_pid), _poll_delay_secs(poll_delay_secs)
- {
+ ParentProcessWatcherData(lsp::Log& log, int _pid,
+ const std::function<void()>&& 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) + "\"";
+ command = "cmd /c \"tasklist /FI \"PID eq " + std::to_string(pid) + "\" | findstr " +
+ std::to_string(pid) + "\"";
#else
- command = "ps -p " + std::to_string(pid);
+ command = "ps -p " + std::to_string(pid);
#endif
- }
+ }
- void run()
- {
- write_to_service = std::make_shared<boost::process::opstream>();
- read_from_service = std::make_shared<boost::process::ipstream>();
+ void run()
+ {
+ write_to_service = std::make_shared<boost::process::opstream>();
+ read_from_service = std::make_shared<boost::process::ipstream>();
-// 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<bp::child>(asio_io.getIOService(), command,
- ec,
+// 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<bp::child>(asio_io.getIOService(), command,
+ ec,
#ifdef _WIN32
- bp::windows::hide,
+ 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)
- {
+ 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));
- }
+ 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<SimpleTimer<boost::posix_time::seconds>>(self->_poll_delay_secs, [=]() {
- self->run();
- });
- }
+ self->timer = std::make_unique<SimpleTimer<boost::posix_time::seconds>>(self->_poll_delay_secs, [=]() {
+ self->run();
+ });
+ }
- }));
- if (ec)
- {
- // fail
- _log.log(lsp::Log::Level::SEVERE, "Start parent process watcher failed.");
- }
- }
+ }));
+ if (ec)
+ {
+ // fail
+ _log.log(lsp::Log::Level::SEVERE, "Start parent process watcher failed.");
+ }
+ }
};
ParentProcessWatcher::ParentProcessWatcher(lsp::Log& log, int pid,
- const std::function<void()>&& callback, uint32_t poll_delay_secs) : d_ptr(new ParentProcessWatcherData(log, pid, std::move(callback), poll_delay_secs))
+ const std::function<void()>&& callback, uint32_t poll_delay_secs) : d_ptr(new ParentProcessWatcherData(log, pid, std::move(callback), poll_delay_secs))
{
- d_ptr->run();
+ d_ptr->run();
}
ParentProcessWatcher::~ParentProcessWatcher()
{
- if (d_ptr->timer)
- d_ptr->timer->Stop();
+ 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
index af008e9eb9..c860b555af 100644
--- a/graphics/asymptote/LspCpp/src/lsp/ProtocolJsonHandler.cpp
+++ b/graphics/asymptote/LspCpp/src/lsp/ProtocolJsonHandler.cpp
@@ -73,644 +73,644 @@
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);
-
- };
-
+
+ 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);
- };
-
+ 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);
- };
+ 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)
- {
+ handler.method2request[Req_ClientRegisterCapability::request::kMethodInfo]= [](Reader& visitor)
+ {
- return Req_ClientRegisterCapability::request::ReflectReader(visitor);
- };
- handler.method2request[Req_ClientUnregisterCapability::request::kMethodInfo] = [](Reader& visitor)
- {
+ return Req_ClientRegisterCapability::request::ReflectReader(visitor);
+ };
+ handler.method2request[Req_ClientUnregisterCapability::request::kMethodInfo] = [](Reader& visitor)
+ {
- return Req_ClientUnregisterCapability::request::ReflectReader(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);
- };
+ 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);
+ 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
index ebe3e334d0..7348cbd0df 100644
--- a/graphics/asymptote/LspCpp/src/lsp/initialize.cpp
+++ b/graphics/asymptote/LspCpp/src/lsp/initialize.cpp
@@ -3,43 +3,43 @@
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;
+ 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;
- }
+ 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<lsTextDocumentSyncKind>, boost::optional<lsTextDocumentSyncOptions> >& value)
{
- if(((JsonReader&)visitor).m_->IsObject())
- {
- Reflect(visitor, value.second);
- }
- else
- {
- Reflect(visitor, value.first);
- }
-} \ No newline at end of file
+ if(((JsonReader&)visitor).m_->IsObject())
+ {
+ Reflect(visitor, value.second);
+ }
+ else
+ {
+ Reflect(visitor, value.first);
+ }
+}
diff --git a/graphics/asymptote/LspCpp/src/lsp/lsp.cpp b/graphics/asymptote/LspCpp/src/lsp/lsp.cpp
index bf39b9383a..792995c8fb 100644
--- a/graphics/asymptote/LspCpp/src/lsp/lsp.cpp
+++ b/graphics/asymptote/LspCpp/src/lsp/lsp.cpp
@@ -86,10 +86,10 @@ bool lsRange::operator<(const lsRange& o) const {
std::string lsRange::ToString() const
{
- std::stringstream ss;
- ss << "start:" << start.ToString() << std::endl;
- ss << "end" << end.ToString() << std::endl;
- return ss.str();
+ std::stringstream ss;
+ ss << "start:" << start.ToString() << std::endl;
+ ss << "end" << end.ToString() << std::endl;
+ return ss.str();
}
lsLocation::lsLocation() {}
@@ -111,10 +111,10 @@ bool lsTextEdit::operator==(const lsTextEdit& that) {
std::string lsTextEdit::ToString() const
{
- std::stringstream ss;
- ss << "Range:" << range.ToString() << std::endl;
- ss << "newText:" << newText << std::endl;
- return ss.str();
+ std::stringstream ss;
+ ss << "Range:" << range.ToString() << std::endl;
+ ss << "newText:" << newText << std::endl;
+ return ss.str();
}
void Reflect(Writer& visitor, lsMarkedString& value) {
@@ -132,39 +132,39 @@ void Reflect(Writer& visitor, lsMarkedString& value) {
void Reflect(Reader& visitor, lsMarkedString& value)
{
- REFLECT_MEMBER_START();
- REFLECT_MEMBER(language);
- REFLECT_MEMBER(value);
- REFLECT_MEMBER_END();
+ 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);
- }
+ 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());
- }
+ if (value.first)
+ {
+ Reflect(visitor, value.first.value());
+ }
+ else if (value.second)
+ {
+ Reflect(visitor, value.second.value());
+ }
}
@@ -172,28 +172,28 @@ 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);
- }
- }
+ 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);
+ }
+ }
}
@@ -202,410 +202,410 @@ void Reflect(Reader& visitor, lsWorkspaceEdit::Either& value)
{
- if(visitor.HasMember("textDocument"))
- {
- Reflect(visitor, value.first);
- }
- else
- {
- Reflect(visitor, value.second);
- }
+ 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<lsCreateFile>();
- auto temp = ptr.get();
- Reflect(visitor, *temp);
- return ptr.release();
- }
- else if (find->value == "rename")
- {
- auto ptr = std::make_unique<lsRenameFile>();
- auto temp = ptr.get();
- Reflect(visitor, *temp);
- return ptr.release();
- }
- else if (find->value == "delete")
- {
-
- auto ptr = std::make_unique<lsDeleteFile>();
- auto temp = ptr.get();
- Reflect(visitor, *temp);
- return ptr.release();
- }
- }
- catch (std::exception&)
- {
-
- }
- return nullptr;
+ 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<lsCreateFile>();
+ auto temp = ptr.get();
+ Reflect(visitor, *temp);
+ return ptr.release();
+ }
+ else if (find->value == "rename")
+ {
+ auto ptr = std::make_unique<lsRenameFile>();
+ auto temp = ptr.get();
+ Reflect(visitor, *temp);
+ return ptr.release();
+ }
+ else if (find->value == "delete")
+ {
+
+ auto ptr = std::make_unique<lsDeleteFile>();
+ 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);
- }
+ 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;
+ 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;
+ 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<LspMessage> value)
{
- if (value)
- {
- jsonType = rapidjson::Type::kObjectType;
- data = value->ToJson();
- }
- else
- {
- assert(false);
- }
+ 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();
+ jsonType = _type;
+ data.swap(_data);
+ GetType();
}
void lsp::Any::SetJsonString(const std::string& _data, Type _type)
{
- jsonType = _type;
- data = (_data);
- GetType();
+ 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;
+ 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;
+ JsonReaderForAny()
+ : JsonReader(&document)
+ {
+ }
+ rapidjson::Document document;
};
bool lsp::Any::GetForMapHelper(std::string& value)
{
- return Get(value);
+ return Get(value);
}
bool lsp::Any::GetForMapHelper(boost::optional<std::string>& value)
{
- return Get(value);
+ return Get(value);
}
std::unique_ptr<Reader> lsp::Any::GetReader()
{
- auto reader = new JsonReaderForAny();
- std::unique_ptr<Reader> ret(reader);
- reader->document.Parse(data.c_str(), data.length());
- if (reader->document.HasParseError())
- {
- return {};
- }
- if (jsonType == kUnKnown)
- {
- jsonType = reader->document.GetType();
- }
- return (ret);
+ auto reader = new JsonReaderForAny();
+ std::unique_ptr<Reader> 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<rapidjson::StringBuffer> writer;
- JsonWriterForAny():JsonWriter(&writer), writer(output)
- {
+ rapidjson::StringBuffer output;
+ rapidjson::Writer<rapidjson::StringBuffer> writer;
+ JsonWriterForAny():JsonWriter(&writer), writer(output)
+ {
- }
+ }
};
std::unique_ptr<Writer> lsp::Any::GetWriter() const
{
- return std::make_unique<JsonWriterForAny>();
+ return std::make_unique<JsonWriterForAny>();
}
void lsp::Any::SetData(std::unique_ptr<Writer>& writer)
{
- auto _temp = static_cast<JsonWriterForAny*>(writer.get());
- data = _temp->output.GetString();
- GuessType();
+ auto _temp = static_cast<JsonWriterForAny*>(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;
- }
- }
+ 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;
- }
- }
+ 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<JsonReader&>(visitor);
- value.SetJsonString(visitor.ToString(), convert(json_reader.m_->GetType()));
+ //if (visitor.IsNull()) {
+ // visitor.GetNull();
+ // value.SetJsonString("", rapidjson::Type::kNullType);
+ // return;
+ //}else
+ //{
+ //
+ //}
+ JsonReader& json_reader = reinterpret_cast<JsonReader&>(visitor);
+ value.SetJsonString(visitor.ToString(), convert(json_reader.m_->GetType()));
}
void Reflect(Writer& visitor, lsp::Any& value)
{
- JsonWriter& json_writer = reinterpret_cast<JsonWriter&>(visitor);
- json_writer.m_->RawValue( value.Data().data(),value.Data().size(),static_cast<rapidjson::Type>(value.GetType()));
+ JsonWriter& json_writer = reinterpret_cast<JsonWriter&>(visitor);
+ json_writer.m_->RawValue( value.Data().data(),value.Data().size(),static_cast<rapidjson::Type>(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);
- }
+ 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);
- }
+ 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";
+ kind = "create";
}
lsDeleteFile::lsDeleteFile()
{
- kind = "delete";
+ kind = "delete";
}
lsRenameFile::lsRenameFile()
{
- kind = "rename";
+ kind = "rename";
}
void Reflect(Reader& visitor, boost::optional< SelectionRange* >& value)
{
- if (visitor.IsNull()) {
- visitor.GetNull();
- return;
- }
+ if (visitor.IsNull()) {
+ visitor.GetNull();
+ return;
+ }
- SelectionRange* entry_value = nullptr;
+ SelectionRange* entry_value = nullptr;
- std::unique_ptr<SelectionRange> ptr = std::make_unique<SelectionRange>();
- SelectionRange* temp = ptr.get();
- Reflect(visitor, *temp);
+ std::unique_ptr<SelectionRange> ptr = std::make_unique<SelectionRange>();
+ SelectionRange* temp = ptr.get();
+ Reflect(visitor, *temp);
- entry_value = ptr.release();
- value = (entry_value);
+ entry_value = ptr.release();
+ value = (entry_value);
}
void Reflect(Writer& visitor, SelectionRange* value)
{
- if (!value)
- {
- throw std::invalid_argument("ResourceOperation value is nullptr");
- }
+ if (!value)
+ {
+ throw std::invalid_argument("ResourceOperation value is nullptr");
+ }
- Reflect(visitor, *value);
+ 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_;
+ 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 p;
+ p.path = std::string(path);
+ return p;
}
@@ -614,116 +614,116 @@ AbsolutePath::AbsolutePath() {}
AbsolutePath::operator std::string() const {
- return path;
+ return path;
}
bool AbsolutePath::operator==(const AbsolutePath& rhs) const {
- return path == rhs.path;
+ return path == rhs.path;
}
bool AbsolutePath::operator!=(const AbsolutePath& rhs) const {
- return path != rhs.path;
+ return path != rhs.path;
}
bool AbsolutePath::operator<(const AbsolutePath& rhs) const
{
- return path < rhs.path;
+ return path < rhs.path;
}
bool AbsolutePath::operator>(const AbsolutePath& rhs) const
{
- return path > rhs.path;
+ return path > rhs.path;
}
void Reflect(Reader& visitor, AbsolutePath& value) {
- value.path = visitor.GetString();
+ value.path = visitor.GetString();
}
void Reflect(Writer& visitor, AbsolutePath& value) {
- visitor.String(value.path.c_str(), value.path.length());
+ visitor.String(value.path.c_str(), value.path.length());
}
std::ostream& operator<<(std::ostream& out, const AbsolutePath& path) {
- out << path.path;
- return out;
+ out << path.path;
+ return out;
}
lsDocumentUri lsDocumentUri::FromPath(const AbsolutePath& path) {
- lsDocumentUri result;
- result.SetPath(path);
- return result;
+ lsDocumentUri result;
+ result.SetPath(path);
+ return result;
}
//void lsDocumentUri::SetPath(const AbsolutePath& path)
//{
-// raw_uri_ = make_file_scheme_uri(path.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;
+ // 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");
- }
+ 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());
+ // 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
+ // TODO: proper fix
#if defined(_WIN32)
- t += "file:///";
+ t += "file:///";
#else
- t += "file://";
+ 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);
+ // 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_;
+ if (raw_uri_.compare(0, 8, "file:///"))
+ return raw_uri_;
- std::string ret;
+ std::string ret;
#if defined(_WIN32)
- size_t i = 8;
+ size_t i = 8;
#else
- size_t i = 7;
+ 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;
+ 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() {}
@@ -731,7 +731,7 @@ lsDocumentUri::lsDocumentUri() {}
lsDocumentUri::lsDocumentUri(const AbsolutePath& path)
{
- SetPath(path);
+ SetPath(path);
}
lsDocumentUri::lsDocumentUri(const lsDocumentUri& other): raw_uri_(other.raw_uri_)
@@ -739,351 +739,351 @@ lsDocumentUri::lsDocumentUri(const lsDocumentUri& other): raw_uri_(other.raw_uri
}
bool lsDocumentUri::operator==(const lsDocumentUri& other) const {
- return raw_uri_ == other.raw_uri_;
+ return raw_uri_ == other.raw_uri_;
}
bool lsDocumentUri::operator==(const std::string& other) const
{
- return raw_uri_ == other;
+ 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);
- }
- }
+ 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);
+ 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;
- }
- }
+ : 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_);
+ 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.
+ 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 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 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";
- }
+ 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";
- }
+ 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;
+ if (textEdit)
+ return textEdit->newText;
+ if (insertText.has_value() && !insertText->empty())
+ return insertText.value();
+ return label;
}
std::string lsCompletionItem::DisplayText()
{
- if (detail)
- {
+ if (detail)
+ {
- return label + " in " + detail.value();
- }
- return label;
+ 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();
+ 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";
-
- };
+ 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);
+ lsp::EnsureEndsInSlash(this->path);
}
bool Directory::operator==(const Directory& rhs) const {
- return path == rhs.path;
+ return path == rhs.path;
}
bool Directory::operator!=(const Directory& rhs) const {
- return path != rhs.path;
+ 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;
+ 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
index 79d9a6fc63..fba0edc30c 100644
--- a/graphics/asymptote/LspCpp/src/lsp/lsp_diagnostic.cpp
+++ b/graphics/asymptote/LspCpp/src/lsp/lsp_diagnostic.cpp
@@ -10,66 +10,66 @@ bool lsDiagnostic::operator!=(const lsDiagnostic& rhs) const {
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";
+ 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())
- {
+ if(data.has_value())
+ {
- info += "data:" + data.value().Data();
- info += "\n";
- }
- return info;
+ info += "data:" + data.value().Data();
+ info += "\n";
+ }
+ return info;
}
void lsResponseError::Write(Writer& visitor) {
- auto& value = *this;
- int code2 = static_cast<int>(this->code);
+ auto& value = *this;
+ int code2 = static_cast<int>(this->code);
- visitor.StartObject();
- REFLECT_MEMBER2("code", code2);
- REFLECT_MEMBER(message);
- visitor.EndObject();
+ 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
index 4d0b6b8713..a95c2b1ea8 100644
--- a/graphics/asymptote/LspCpp/src/lsp/textDocument.cpp
+++ b/graphics/asymptote/LspCpp/src/lsp/textDocument.cpp
@@ -14,336 +14,336 @@ constexpr unsigned SemanticTokenEncodingSize = 5;
std::string to_string(SemanticTokenType _type)
{
- switch (_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";
- }
+ 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<SemanticTokenType>& modifiers)
{
- unsigned encode_type = 0;
- for (auto bit : modifiers) {
- encode_type = encode_type | (0b00000001 << bit);
- }
- return encode_type;
+ 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";
+ 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";
- }
+ 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<SemanticTokenModifier>& modifiers)
{
- unsigned encodedModifiers = 0;
- for (auto bit : modifiers) {
- encodedModifiers = encodedModifiers | (0b00000001 << bit);
- }
- return encodedModifiers;
+ 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");
+ 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");
+ 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);
+ 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<int32_t> SemanticTokens::encodeTokens(std::vector<SemanticToken>& tokens)
{
- std::vector<int32_t> 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;
+ std::vector<int32_t> 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
- {
+ if(visitor.IsArray())
+ {
+ Reflect(visitor, value.first);
+ }
+ else
+ {
- Reflect(visitor, value.second);
- }
+ Reflect(visitor, value.second);
+ }
}
void Reflect(Reader& visitor, TextDocumentDocumentSymbol::Either& value)
{
- if (visitor.HasMember("location"))
- {
- Reflect(visitor, value.first);
- }
- else
- {
- Reflect(visitor, value.second);
- }
+ if (visitor.HasMember("location"))
+ {
+ Reflect(visitor, value.first);
+ }
+ else
+ {
+ Reflect(visitor, value.second);
+ }
}
void Reflect(Reader& visitor, std::pair<boost::optional<std::string>, boost::optional<lsMarkedString>>& value)
{
- if (!visitor.IsString())
- {
- Reflect(visitor, value.second);
- }
- else
- {
- Reflect(visitor, value.first);
- }
+ if (!visitor.IsString())
+ {
+ Reflect(visitor, value.second);
+ }
+ else
+ {
+ Reflect(visitor, value.first);
+ }
}
void Reflect(Reader& visitor, std::pair<boost::optional<std::string>, boost::optional<MarkupContent>>& value)
{
- if (!visitor.IsString())
- {
- Reflect(visitor, value.second);
- }
- else
- {
- Reflect(visitor, value.first);
- }
+ if (!visitor.IsString())
+ {
+ Reflect(visitor, value.second);
+ }
+ else
+ {
+ Reflect(visitor, value.first);
+ }
}
void Reflect(Reader& visitor, TextDocumentHover::Either& value)
{
- JsonReader& reader = dynamic_cast<JsonReader&>(visitor);
- if (reader.IsArray())
- {
- Reflect(visitor, value.first);
- }
- else if(reader.m_->IsObject())
- {
- Reflect(visitor, value.second);
- }
+ JsonReader& reader = dynamic_cast<JsonReader&>(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);
- }
+ if (visitor.HasMember("placeholder"))
+ {
+ Reflect(visitor, value.second);
+ }
+ else
+ {
+ Reflect(visitor, value.first);
+ }
}
namespace
- RefactorProposalUtility
+ 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";
+ 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* 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";
+ 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;
+ 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;
- }
+ 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
index 32c70f517a..445f4a72cf 100644
--- a/graphics/asymptote/LspCpp/src/lsp/utils.cpp
+++ b/graphics/asymptote/LspCpp/src/lsp/utils.cpp
@@ -322,118 +322,118 @@ bool IsDirectory(const std::string& path) {
// 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*/);
+ 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) {
+ 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*/);
+ 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);
+ return RealPathNotExpandSymlink(path0, ensure_exists);
#endif
@@ -445,166 +445,166 @@ AbsolutePath NormalizePath(const std::string& path0,
// 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);
+ 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 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;
+ 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<std::wstring>& 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;
- }
- }
+ 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<std::wstring>& 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());
- }
- }
+ 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<std::wstring>& 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;
- }
- }
+ const std::wstring& rootPath,
+ std::vector<std::wstring>& 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<std::wstring>& ret,
- std::wstring strSuf)
+ std::wstring strSuf)
{
- scanFilesUseRecursive(rootPath, ret, strSuf);
- std::vector<std::wstring> names;
- for (auto& it : ret)
- {
- if (it.size() >= rootPath.size())
- {
- names.push_back(it.substr(rootPath.size()));
- }
- }
- ret.swap(names);
+ scanFilesUseRecursive(rootPath, ret, strSuf);
+ std::vector<std::wstring> 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<std::string>& ret, std::string strSuf)
{
- std::vector<std::wstring> out;
- scanFileNamesUseRecursive(s2ws(rootPath), out, s2ws(strSuf));
- for (auto& it : out)
- {
- ret.push_back(ws2s(it));
- }
+ std::vector<std::wstring> out;
+ scanFileNamesUseRecursive(s2ws(rootPath), out, s2ws(strSuf));
+ for (auto& it : out)
+ {
+ ret.push_back(ws2s(it));
+ }
}
void scanFilesUseRecursive(const std::string& rootPath, std::vector<std::string>& ret, std::string strSuf)
{
- std::vector<std::wstring> out;
- scanFilesUseRecursive(s2ws(rootPath), out, s2ws(strSuf));
- for (auto& it : out)
- {
- ret.push_back(ws2s(it));
- }
+ std::vector<std::wstring> 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
index 0900021037..4eb4b29053 100644
--- a/graphics/asymptote/LspCpp/src/lsp/working_files.cpp
+++ b/graphics/asymptote/LspCpp/src/lsp/working_files.cpp
@@ -139,7 +139,7 @@ bool WorkingFiles::OnClose(const lsTextDocumentIdentifier& close) {
if( findIt != d_ptr->files.end())
{
d_ptr->files.erase(findIt);
- return true;
+ return true;
}
return false;
}
@@ -183,4 +183,4 @@ bool WorkingFiles::GetFileBufferContent(std::shared_ptr<WorkingFile>& file, std:
void WorkingFiles::Clear() {
std::lock_guard<std::mutex> lock(d_ptr->files_mutex);
d_ptr->files.clear();
-} \ No newline at end of file
+}
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.cpp
index 59ae4c4101..2d32ea3539 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.cpp
@@ -69,7 +69,7 @@ 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())
+ if (memberItr != CURRENT.MemberEnd())
STACK->push(JsonReaderStackItem(&memberItr->value, JsonReaderStackItem::BeforeStart));
else
mError = true;
@@ -218,7 +218,7 @@ JsonWriter::JsonWriter() : mWriter(), mStream() {
mWriter = new PrettyWriter<StringBuffer>(*STREAM);
}
-JsonWriter::~JsonWriter() {
+JsonWriter::~JsonWriter() {
delete WRITER;
delete STREAM;
}
@@ -249,7 +249,7 @@ bool JsonWriter::HasMember(const char*) const {
}
JsonWriter& JsonWriter::StartArray(size_t*) {
- WRITER->StartArray();
+ WRITER->StartArray();
return *this;
}
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.h b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.h
index 285ca73d6a..72d0cdd65c 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.h
@@ -17,7 +17,7 @@ public:
/// Starts an object
Archiver& StartObject();
-
+
/// After calling StartObject(), assign a member with a name
Archiver& Member(const char* name);
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archivertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archivertest.cpp
index 417a421a31..3b84e358b7 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archivertest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archivertest.cpp
@@ -55,7 +55,7 @@ void test1() {
//////////////////////////////////////////////////////////////////////////////
// Test2: std::vector <=> JSON array
-//
+//
// You can map a JSON array to other data structures as well
struct Group {
@@ -67,7 +67,7 @@ struct Group {
template <typename Archiver>
Archiver& operator&(Archiver& ar, Group& g) {
ar.StartObject();
-
+
ar.Member("groupName");
ar & g.groupName;
@@ -203,14 +203,14 @@ class Canvas {
public:
Canvas() : shapes_() {}
~Canvas() { Clear(); }
-
+
void Clear() {
for (std::vector<Shape*>::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<Shape*>::iterator itr = shapes_.begin(); itr != shapes_.end(); ++itr) {
(*itr)->Print(os);
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/capitalize/capitalize.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/capitalize/capitalize.cpp
index 7da37e9c50..c56640bc50 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/capitalize/capitalize.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/capitalize/capitalize.cpp
@@ -1,6 +1,6 @@
// JSON condenser example
-// This example parses JSON from stdin with validation,
+// 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"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/condense/condense.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/condense/condense.cpp
index 46dc350439..f2d05ca694 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/condense/condense.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/condense/condense.cpp
@@ -1,6 +1,6 @@
// JSON condenser example
-// This example parses JSON text from stdin with validation,
+// This example parses JSON text from stdin with validation,
// and re-output the JSON content to stdout without whitespace.
#include "rapidjson/reader.h"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkey/filterkey.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkey/filterkey.cpp
index c34a050dc8..3ef72314ef 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkey/filterkey.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkey/filterkey.cpp
@@ -19,7 +19,7 @@ class FilterKeyHandler {
public:
typedef char Ch;
- FilterKeyHandler(OutputHandler& outputHandler, const Ch* keyString, SizeType keyLength) :
+ FilterKeyHandler(OutputHandler& outputHandler, const Ch* keyString, SizeType keyLength) :
outputHandler_(outputHandler), keyString_(keyString), keyLength_(keyLength), filterValueDepth_(), filteredKeyCount_()
{}
@@ -32,8 +32,8 @@ public:
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() {
+
+ bool StartObject() {
if (filterValueDepth_ > 0) {
filterValueDepth_++;
return true;
@@ -43,9 +43,9 @@ public:
return outputHandler_.StartObject();
}
}
-
- bool Key(const Ch* str, SizeType len, bool copy) {
- if (filterValueDepth_ > 0)
+
+ 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;
@@ -97,7 +97,7 @@ private:
filterValueDepth_ = 0;
return true;
}
-
+
OutputHandler& outputHandler_;
const char* keyString_;
const SizeType keyLength_;
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkeydom/filterkeydom.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkeydom/filterkeydom.cpp
index 732cc81f13..b8cfdf0c80 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkeydom/filterkeydom.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkeydom/filterkeydom.cpp
@@ -20,7 +20,7 @@ class FilterKeyHandler {
public:
typedef char Ch;
- FilterKeyHandler(OutputHandler& outputHandler, const Ch* keyString, SizeType keyLength) :
+ FilterKeyHandler(OutputHandler& outputHandler, const Ch* keyString, SizeType keyLength) :
outputHandler_(outputHandler), keyString_(keyString), keyLength_(keyLength), filterValueDepth_(), filteredKeyCount_()
{}
@@ -33,8 +33,8 @@ public:
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() {
+
+ bool StartObject() {
if (filterValueDepth_ > 0) {
filterValueDepth_++;
return true;
@@ -44,9 +44,9 @@ public:
return outputHandler_.StartObject();
}
}
-
- bool Key(const Ch* str, SizeType len, bool copy) {
- if (filterValueDepth_ > 0)
+
+ 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;
@@ -112,7 +112,7 @@ class FilterKeyReader {
public:
typedef char Ch;
- FilterKeyReader(InputStream& is, const Ch* keyString, SizeType keyLength) :
+ FilterKeyReader(InputStream& is, const Ch* keyString, SizeType keyLength) :
is_(is), keyString_(keyString), keyLength_(keyLength), parseResult_()
{}
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/jsonx/jsonx.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/jsonx/jsonx.cpp
index 954aa2b907..b08efc6087 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/jsonx/jsonx.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/jsonx/jsonx.cpp
@@ -1,7 +1,7 @@
// 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,
+// 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.
@@ -24,34 +24,34 @@ public:
bool Null() {
return WriteStartElement("null", true);
}
-
+
bool Bool(bool b) {
- return
+ 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));
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/lookaheadparser/lookaheadparser.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/lookaheadparser/lookaheadparser.cpp
index f627f4d863..8824ef7867 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/lookaheadparser/lookaheadparser.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/lookaheadparser/lookaheadparser.cpp
@@ -75,12 +75,12 @@ protected:
kEnteringArray,
kExitingArray
};
-
+
Value v_;
LookaheadParsingState st_;
Reader r_;
InsituStringStream ss_;
-
+
static const int parseFlags = kParseDefaultFlags | kParseInsituFlag;
};
@@ -94,14 +94,14 @@ void LookaheadParserHandler::ParseNext() {
st_ = kError;
return;
}
-
+
r_.IterativeParseNext<parseFlags>(ss_, *this);
}
class LookaheadParser : protected LookaheadParserHandler {
public:
LookaheadParser(char* str) : LookaheadParserHandler(str) {}
-
+
bool EnterObject();
bool EnterArray();
const char* NextObjectKey();
@@ -117,9 +117,9 @@ public:
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);
};
@@ -129,7 +129,7 @@ bool LookaheadParser::EnterObject() {
st_ = kError;
return false;
}
-
+
ParseNext();
return true;
}
@@ -139,7 +139,7 @@ bool LookaheadParser::EnterArray() {
st_ = kError;
return false;
}
-
+
ParseNext();
return true;
}
@@ -150,12 +150,12 @@ const char* LookaheadParser::NextObjectKey() {
ParseNext();
return result;
}
-
+
if (st_ != kExitingObject) {
st_ = kError;
return 0;
}
-
+
ParseNext();
return 0;
}
@@ -165,7 +165,7 @@ bool LookaheadParser::NextArrayValue() {
ParseNext();
return false;
}
-
+
if (st_ == kError || st_ == kExitingObject || st_ == kHasKey) {
st_ = kError;
return false;
@@ -190,7 +190,7 @@ double LookaheadParser::GetDouble() {
st_ = kError;
return 0.;
}
-
+
double result = v_.GetDouble();
ParseNext();
return result;
@@ -201,7 +201,7 @@ bool LookaheadParser::GetBool() {
st_ = kError;
return false;
}
-
+
bool result = v_.GetBool();
ParseNext();
return result;
@@ -221,7 +221,7 @@ const char* LookaheadParser::GetString() {
st_ = kError;
return 0;
}
-
+
const char* result = v_.GetString();
ParseNext();
return result;
@@ -260,7 +260,7 @@ Value* LookaheadParser::PeekValue() {
if (st_ >= kHasNull && st_ <= kHasKey) {
return &v_;
}
-
+
return 0;
}
@@ -268,11 +268,11 @@ int LookaheadParser::PeekType() {
if (st_ >= kHasNull && st_ <= kHasKey) {
return v_.GetType();
}
-
+
if (st_ == kEnteringArray) {
return kArrayType;
}
-
+
if (st_ == kEnteringObject) {
return kObjectType;
}
@@ -292,7 +292,7 @@ int main() {
"\"skipString\":\"zzz\", \"reachedEnd\":null, \"t\":true }";
LookaheadParser r(json);
-
+
RAPIDJSON_ASSERT(r.PeekType() == kObjectType);
r.EnterObject();
@@ -319,9 +319,9 @@ int main() {
}
else if (0 == strcmp(key, "a")) {
RAPIDJSON_ASSERT(r.PeekType() == kArrayType);
-
+
r.EnterArray();
-
+
cout << key << ":[ ";
while (r.NextArrayValue()) {
if (r.PeekType() == kNumberType) {
@@ -335,7 +335,7 @@ int main() {
break;
}
}
-
+
cout << "]" << endl;
}
else {
@@ -343,7 +343,7 @@ int main() {
r.SkipValue();
}
}
-
+
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
index ff735394ec..3d8b494221 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/parsebyparts/parsebyparts.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/parsebyparts/parsebyparts.cpp
@@ -35,7 +35,7 @@ public:
if (!parseThread_.joinable())
return;
- {
+ {
std::unique_lock<std::mutex> lock(mutex_);
// Wait until the buffer is read up (or parsing is completed)
@@ -54,7 +54,7 @@ public:
void ParsePart(const char* buffer, size_t length) {
std::unique_lock<std::mutex> lock(mutex_);
-
+
// Wait until the buffer is read up (or parsing is completed)
while (!stream_.Empty() && !completed_)
finish_.wait(lock);
@@ -156,7 +156,7 @@ int main() {
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<OStreamWrapper> writer(os);
@@ -166,7 +166,7 @@ int main() {
return EXIT_SUCCESS;
}
-#else // Not supporting C++11
+#else // Not supporting C++11
#include <iostream>
int main() {
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/schemavalidator/schemavalidator.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/schemavalidator/schemavalidator.cpp
index 8c7e26c795..9fa1bb10a1 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/schemavalidator/schemavalidator.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/schemavalidator/schemavalidator.cpp
@@ -155,7 +155,7 @@ int main(int argc, char *argv[]) {
}
fclose(fp);
}
-
+
// Then convert the Document into SchemaDocument
SchemaDocument sd(d);
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/serialize/serialize.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/serialize/serialize.cpp
index 12d87151e6..f1be5c4183 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/serialize/serialize.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/serialize/serialize.cpp
@@ -50,7 +50,7 @@ public:
template <typename Writer>
void Serialize(Writer& writer) const {
writer.StartObject();
-
+
writer.String("school");
#if RAPIDJSON_HAS_STDSTRING
writer.String(school_);
@@ -104,7 +104,7 @@ private:
};
Dependent::~Dependent() {
- delete education_;
+ delete education_;
}
class Employee : public Person {
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplepullreader/simplepullreader.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplepullreader/simplepullreader.cpp
index a4fb1161a4..42c45ff1f6 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplepullreader/simplepullreader.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplepullreader/simplepullreader.cpp
@@ -15,7 +15,7 @@ template <typename T> std::string stringify(T x) {
struct MyHandler {
const char* type;
std::string data;
-
+
MyHandler() : type(), data() {}
bool Null() { type = "Null"; data.clear(); return true; }
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplereader/simplereader.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplereader/simplereader.cpp
index 5aae8a1c0a..f86182dfb7 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplereader/simplereader.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplereader/simplereader.cpp
@@ -12,11 +12,11 @@ struct MyHandler {
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) {
+ 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) {
+ bool String(const char* str, SizeType length, bool copy) {
cout << "String(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl;
return true;
}
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplewriter/simplewriter.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplewriter/simplewriter.cpp
index 8d1275c292..2f4d83ad29 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplewriter/simplewriter.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplewriter/simplewriter.cpp
@@ -8,8 +8,8 @@ using namespace std;
int main() {
StringBuffer s;
Writer<StringBuffer> writer(s);
-
- writer.StartObject(); // Between StartObject()/EndObject(),
+
+ writer.StartObject(); // Between StartObject()/EndObject(),
writer.Key("hello"); // output a key,
writer.String("world"); // follow by a value.
writer.Key("t");
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/traverseaspointer.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/traverseaspointer.cpp
index 7e0c89923e..cf80f7acc6 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/traverseaspointer.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/traverseaspointer.cpp
@@ -17,7 +17,7 @@ void traverse(const Value& v, const Pointer& p) {
traverse(v[i], p.Append(i));
break;
case kObjectType:
- for (Value::ConstMemberIterator m = v.MemberBegin(); m != v.MemberEnd(); ++m)
+ for (Value::ConstMemberIterator m = v.MemberBegin(); m != v.MemberEnd(); ++m)
traverse(m->value, p.Append(m->name.GetString(), m->name.GetStringLength()));
break;
default:
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/tutorial/tutorial.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/tutorial/tutorial.cpp
index d6021c6689..f97b0be86e 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/example/tutorial/tutorial.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/tutorial/tutorial.cpp
@@ -32,7 +32,7 @@ int main(int, char*[]) {
printf("\nParsing to document succeeded.\n");
////////////////////////////////////////////////////////////////////////////
- // 2. Access values in document.
+ // 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.
@@ -69,7 +69,7 @@ int main(int, char*[]) {
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;
@@ -128,7 +128,7 @@ int main(int, char*[]) {
// Shorter but slower version:
// document["hello"].SetString(buffer, document.GetAllocator());
- // Constructor version:
+ // Constructor version:
// Value author(buffer, len, document.GetAllocator());
// Value author(buffer, document.GetAllocator());
memset(buffer2, 0, sizeof(buffer2)); // For demonstration purpose.
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h
index 12bc5bafcb..8918cf76fe 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -31,10 +31,10 @@ RAPIDJSON_NAMESPACE_BEGIN
/*! \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
+
+ So if an allocator need to support Free(), it needs to put its pointer in
the header of memory block.
\code
@@ -82,7 +82,7 @@ concept Allocator {
class CrtAllocator {
public:
static const bool kNeedFree = true;
- void* Malloc(size_t size) {
+ void* Malloc(size_t size) {
if (size) // behavior of malloc(0) is implementation defined.
return RAPIDJSON_MALLOC(size);
else
@@ -110,7 +110,7 @@ public:
// MemoryPoolAllocator
//! Default memory allocator used by the parser and DOM.
-/*! This allocator allocate memory blocks from pre-allocated memory chunks.
+/*! This allocator allocate memory blocks from pre-allocated memory chunks.
It does not free memory blocks. And Realloc() only allocate new memory.
@@ -166,7 +166,7 @@ public:
\param baseAllocator The allocator for allocating memory chunks.
*/
explicit
- MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) :
+ MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) :
chunk_capacity_(chunkSize),
baseAllocator_(baseAllocator ? baseAllocator : RAPIDJSON_NEW(BaseAllocator)()),
shared_(static_cast<SharedData*>(baseAllocator_ ? baseAllocator_->Malloc(SIZEOF_SHARED_DATA + SIZEOF_CHUNK_HEADER) : 0))
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/document.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/document.h
index e2cc600064..660e14eb53 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/document.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/document.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -116,7 +116,7 @@ class GenericDocument;
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 <typename Encoding, typename Allocator>
+template <typename Encoding, typename Allocator>
class GenericMember {
public:
GenericValue<Encoding, Allocator> name; //!< name of member (must be a string)
@@ -518,7 +518,7 @@ namespace internal {
template <typename ValueType, typename T>
struct TypeHelper {};
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, bool> {
static bool Is(const ValueType& v) { return v.IsBool(); }
static bool Get(const ValueType& v) { return v.GetBool(); }
@@ -526,7 +526,7 @@ struct TypeHelper<ValueType, bool> {
static ValueType& Set(ValueType& v, bool data, typename ValueType::AllocatorType&) { return v.SetBool(data); }
};
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, int> {
static bool Is(const ValueType& v) { return v.IsInt(); }
static int Get(const ValueType& v) { return v.GetInt(); }
@@ -534,7 +534,7 @@ struct TypeHelper<ValueType, int> {
static ValueType& Set(ValueType& v, int data, typename ValueType::AllocatorType&) { return v.SetInt(data); }
};
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, unsigned> {
static bool Is(const ValueType& v) { return v.IsUint(); }
static unsigned Get(const ValueType& v) { return v.GetUint(); }
@@ -562,7 +562,7 @@ struct TypeHelper<ValueType, unsigned long> {
};
#endif
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, int64_t> {
static bool Is(const ValueType& v) { return v.IsInt64(); }
static int64_t Get(const ValueType& v) { return v.GetInt64(); }
@@ -570,7 +570,7 @@ struct TypeHelper<ValueType, int64_t> {
static ValueType& Set(ValueType& v, int64_t data, typename ValueType::AllocatorType&) { return v.SetInt64(data); }
};
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, uint64_t> {
static bool Is(const ValueType& v) { return v.IsUint64(); }
static uint64_t Get(const ValueType& v) { return v.GetUint64(); }
@@ -578,7 +578,7 @@ struct TypeHelper<ValueType, uint64_t> {
static ValueType& Set(ValueType& v, uint64_t data, typename ValueType::AllocatorType&) { return v.SetUint64(data); }
};
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, double> {
static bool Is(const ValueType& v) { return v.IsDouble(); }
static double Get(const ValueType& v) { return v.GetDouble(); }
@@ -586,7 +586,7 @@ struct TypeHelper<ValueType, double> {
static ValueType& Set(ValueType& v, double data, typename ValueType::AllocatorType&) { return v.SetDouble(data); }
};
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, float> {
static bool Is(const ValueType& v) { return v.IsFloat(); }
static float Get(const ValueType& v) { return v.GetFloat(); }
@@ -594,7 +594,7 @@ struct TypeHelper<ValueType, float> {
static ValueType& Set(ValueType& v, float data, typename ValueType::AllocatorType&) { return v.SetFloat(data); }
};
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, const typename ValueType::Ch*> {
typedef const typename ValueType::Ch* StringType;
static bool Is(const ValueType& v) { return v.IsString(); }
@@ -604,7 +604,7 @@ struct TypeHelper<ValueType, const typename ValueType::Ch*> {
};
#if RAPIDJSON_HAS_STDSTRING
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, std::basic_string<typename ValueType::Ch> > {
typedef std::basic_string<typename ValueType::Ch> StringType;
static bool Is(const ValueType& v) { return v.IsString(); }
@@ -613,7 +613,7 @@ struct TypeHelper<ValueType, std::basic_string<typename ValueType::Ch> > {
};
#endif
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, typename ValueType::Array> {
typedef typename ValueType::Array ArrayType;
static bool Is(const ValueType& v) { return v.IsArray(); }
@@ -622,14 +622,14 @@ struct TypeHelper<ValueType, typename ValueType::Array> {
static ValueType& Set(ValueType& v, ArrayType data, typename ValueType::AllocatorType&) { return v = data; }
};
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, typename ValueType::ConstArray> {
typedef typename ValueType::ConstArray ArrayType;
static bool Is(const ValueType& v) { return v.IsArray(); }
static ArrayType Get(const ValueType& v) { return v.GetArray(); }
};
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, typename ValueType::Object> {
typedef typename ValueType::Object ObjectType;
static bool Is(const ValueType& v) { return v.IsObject(); }
@@ -638,7 +638,7 @@ struct TypeHelper<ValueType, typename ValueType::Object> {
static ValueType& Set(ValueType& v, ObjectType data, typename ValueType::AllocatorType&) { return v = data; }
};
-template<typename ValueType>
+template<typename ValueType>
struct TypeHelper<ValueType, typename ValueType::ConstObject> {
typedef typename ValueType::ConstObject ObjectType;
static bool Is(const ValueType& v) { return v.IsObject(); }
@@ -796,7 +796,7 @@ public:
//! Constructor for unsigned value.
explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_() {
- data_.n.u64 = u;
+ data_.n.u64 = u;
data_.f.flags = (u & 0x80000000) ? kNumberUintFlag : (kNumberUintFlag | kIntFlag | kInt64Flag);
}
@@ -1030,14 +1030,14 @@ public:
switch (GetType()) {
case kObjectType: // Warning: O(n^2) inner-loop
if (data_.o.size != rhs.data_.o.size)
- return false;
+ 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;
@@ -1505,7 +1505,7 @@ public:
\note Linear time complexity.
*/
void RemoveAllMembers() {
- RAPIDJSON_ASSERT(IsObject());
+ RAPIDJSON_ASSERT(IsObject());
DoClearMembers();
}
@@ -1638,7 +1638,7 @@ public:
\note Linear time complexity.
*/
void Clear() {
- RAPIDJSON_ASSERT(IsArray());
+ RAPIDJSON_ASSERT(IsArray());
GenericValue* e = GetElementsPointer();
for (GenericValue* v = e; v != e + data_.a.size; ++v)
v->~GenericValue();
@@ -1844,7 +1844,7 @@ public:
//! 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 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
@@ -1861,7 +1861,7 @@ public:
//! 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 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.
@@ -1870,7 +1870,7 @@ public:
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 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
@@ -1955,10 +1955,10 @@ public:
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);
@@ -2470,7 +2470,7 @@ private:
typedef GenericValue<UTF8<> > Value;
///////////////////////////////////////////////////////////////////////////////
-// GenericDocument
+// GenericDocument
//! A document for parsing JSON text as DOM.
/*!
@@ -2502,12 +2502,12 @@ public:
}
//! Constructor
- /*! Creates an empty document which type is Null.
+ /*! 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) :
+ GenericDocument(Allocator* allocator = 0, size_t stackCapacity = kDefaultStackCapacity, StackAllocator* stackAllocator = 0) :
allocator_(allocator), ownAllocator_(0), stack_(stackAllocator, stackCapacity), parseResult_()
{
if (!allocator_)
@@ -2724,7 +2724,7 @@ public:
GenericDocument& Parse(const Ch* str, size_t length) {
return Parse<parseFlags, Encoding>(str, length);
}
-
+
GenericDocument& Parse(const Ch* str, size_t length) {
return Parse<kParseDefaultFlags>(str, length);
}
@@ -2744,7 +2744,7 @@ public:
GenericDocument& Parse(const std::basic_string<Ch>& str) {
return Parse<kParseDefaultFlags>(str);
}
-#endif // RAPIDJSON_HAS_STDSTRING
+#endif // RAPIDJSON_HAS_STDSTRING
//!@}
@@ -2809,16 +2809,16 @@ public:
bool Uint64(uint64_t i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }
bool Double(double d) { new (stack_.template Push<ValueType>()) ValueType(d); return true; }
- bool RawNumber(const Ch* str, SizeType length, bool copy) {
- if (copy)
+ bool RawNumber(const Ch* str, SizeType length, bool copy) {
+ if (copy)
new (stack_.template Push<ValueType>()) ValueType(str, length, GetAllocator());
else
new (stack_.template Push<ValueType>()) ValueType(str, length);
return true;
}
- bool String(const Ch* str, SizeType length, bool copy) {
- if (copy)
+ bool String(const Ch* str, SizeType length, bool copy) {
+ if (copy)
new (stack_.template Push<ValueType>()) ValueType(str, length, GetAllocator());
else
new (stack_.template Push<ValueType>()) ValueType(str, length);
@@ -2826,7 +2826,7 @@ public:
}
bool StartObject() { new (stack_.template Push<ValueType>()) ValueType(kObjectType); return true; }
-
+
bool Key(const Ch* str, SizeType length, bool copy) { return String(str, length, copy); }
bool EndObject(SizeType memberCount) {
@@ -2836,7 +2836,7 @@ public:
}
bool StartArray() { new (stack_.template Push<ValueType>()) ValueType(kArrayType); return true; }
-
+
bool EndArray(SizeType elementCount) {
ValueType* elements = stack_.template Pop<ValueType>(elementCount);
stack_.template Top<ValueType>()->SetArrayRaw(elements, elementCount, GetAllocator());
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h
index cf046b8923..309499dc6b 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -41,7 +41,7 @@ class EncodedInputStream {
public:
typedef typename Encoding::Ch Ch;
- EncodedInputStream(InputByteStream& is) : is_(is) {
+ EncodedInputStream(InputByteStream& is) : is_(is) {
current_ = Encoding::TakeBOM(is_);
}
@@ -51,7 +51,7 @@ public:
// Not implemented
void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
+ void Flush() { RAPIDJSON_ASSERT(false); }
Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
@@ -80,7 +80,7 @@ public:
// Not implemented
void Put(Ch) {}
- void Flush() {}
+ void Flush() {}
Ch* PutBegin() { return 0; }
size_t PutEnd(Ch*) { return 0; }
@@ -102,7 +102,7 @@ class EncodedOutputStream {
public:
typedef typename Encoding::Ch Ch;
- EncodedOutputStream(OutputByteStream& os, bool putBOM = true) : os_(os) {
+ EncodedOutputStream(OutputByteStream& os, bool putBOM = true) : os_(os) {
if (putBOM)
Encoding::PutBOM(os_);
}
@@ -143,7 +143,7 @@ public:
\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);
+ RAPIDJSON_ASSERT(type >= kUTF8 && type <= kUTF32BE);
DetectType();
static const TakeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Take) };
takeFunc_ = f[type_];
@@ -159,7 +159,7 @@ public:
// Not implemented
void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
+ void Flush() { RAPIDJSON_ASSERT(false); }
Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
@@ -258,7 +258,7 @@ public:
UTFType GetType() const { return type_; }
void Put(Ch c) { putFunc_(*os_, c); }
- void Flush() { os_->Flush(); }
+ void Flush() { os_->Flush(); }
// Not implemented
Ch Peek() const { RAPIDJSON_ASSERT(false); return 0;}
@@ -271,7 +271,7 @@ private:
AutoUTFOutputStream(const AutoUTFOutputStream&);
AutoUTFOutputStream& operator=(const AutoUTFOutputStream&);
- void PutBOM() {
+ void PutBOM() {
typedef void (*PutBOMFunc)(OutputByteStream&);
static const PutBOMFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(PutBOM) };
f[type_](*os_);
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h
index 50ad18bdc0..f9f1ed181e 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -100,7 +100,7 @@ struct UTF8 {
template<typename OutputStream>
static void Encode(OutputStream& os, unsigned codepoint) {
- if (codepoint <= 0x7F)
+ if (codepoint <= 0x7F)
os.Put(static_cast<Ch>(codepoint & 0xFF));
else if (codepoint <= 0x7FF) {
os.Put(static_cast<Ch>(0xC0 | ((codepoint >> 6) & 0xFF)));
@@ -122,7 +122,7 @@ struct UTF8 {
template<typename OutputStream>
static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {
- if (codepoint <= 0x7F)
+ if (codepoint <= 0x7F)
PutUnsafe(os, static_cast<Ch>(codepoint & 0xFF));
else if (codepoint <= 0x7FF) {
PutUnsafe(os, static_cast<Ch>(0xC0 | ((codepoint >> 6) & 0xFF)));
@@ -276,7 +276,7 @@ struct UTF16 {
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
+ RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair
os.Put(static_cast<typename OutputStream::Ch>(codepoint));
}
else {
@@ -292,7 +292,7 @@ struct UTF16 {
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
+ RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair
PutUnsafe(os, static_cast<typename OutputStream::Ch>(codepoint));
}
else {
@@ -406,7 +406,7 @@ struct UTF16BE : UTF16<CharType> {
///////////////////////////////////////////////////////////////////////////////
// UTF32
-//! UTF-32 encoding.
+//! 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
@@ -498,7 +498,7 @@ struct UTF32BE : UTF32<CharType> {
static CharType TakeBOM(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
CharType c = Take(is);
- return static_cast<uint32_t>(c) == 0x0000FEFFu ? Take(is) : c;
+ return static_cast<uint32_t>(c) == 0x0000FEFFu ? Take(is) : c;
}
template <typename InputByteStream>
@@ -694,13 +694,13 @@ struct Transcoder<Encoding, Encoding> {
os.Put(is.Take()); // Just copy one code unit. This semantic is different from primary template class.
return true;
}
-
+
template<typename InputStream, typename OutputStream>
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<typename InputStream, typename OutputStream>
static RAPIDJSON_FORCEINLINE bool Validate(InputStream& is, OutputStream& os) {
return Encoding::Validate(is, os); // source/target encoding are the same
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
index 5d2e57b7fd..7c620a2e6b 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/en.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/en.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -39,13 +39,13 @@ inline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErro
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.");
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
index 6270da11a5..5c890ba0ea 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filereadstream.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filereadstream.h
index f8bb43cb0c..3daff09279 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filereadstream.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filereadstream.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -41,7 +41,7 @@ public:
\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) {
+ 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();
@@ -53,7 +53,7 @@ public:
// Not implemented
void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
+ void Flush() { RAPIDJSON_ASSERT(false); }
Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filewritestream.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filewritestream.h
index 5d89588c21..8a78ef7f09 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filewritestream.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filewritestream.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -33,11 +33,11 @@ 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_) {
+ 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) {
+ void Put(char c) {
if (current_ >= bufferEnd_)
Flush();
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/fwd.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/fwd.h
index d62f77f0ec..07358d8cc9 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/fwd.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/fwd.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -101,7 +101,7 @@ class PrettyWriter;
// document.h
-template <typename Encoding, typename Allocator>
+template <typename Encoding, typename Allocator>
class GenericMember;
template <bool Const, typename Encoding, typename Allocator>
@@ -110,7 +110,7 @@ class GenericMemberIterator;
template<typename CharType>
struct GenericStringRef;
-template <typename Encoding, typename Allocator>
+template <typename Encoding, typename Allocator>
class GenericValue;
typedef GenericValue<UTF8<char>, MemoryPoolAllocator<CrtAllocator> > Value;
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
index af48738038..6c58fc87bb 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -56,7 +56,7 @@ public:
if (length > 0)
AppendDecimal64(decimals + i, decimals + i + length);
}
-
+
BigInteger& operator=(const BigInteger &rhs)
{
if (this != &rhs) {
@@ -65,9 +65,9 @@ public:
}
return *this;
}
-
+
BigInteger& operator=(uint64_t u) {
- digits_[0] = u;
+ digits_[0] = u;
count_ = 1;
return *this;
}
@@ -100,7 +100,7 @@ public:
digits_[i] = MulAdd64(digits_[i], u, k, &hi);
k = hi;
}
-
+
if (k > 0)
PushBack(k);
@@ -123,7 +123,7 @@ public:
digits_[i] = (p0 & 0xFFFFFFFF) | (p1 << 32);
k = p1 >> 32;
}
-
+
if (k > 0)
PushBack(k);
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
index 9f6ae3b3f0..aa27f7b673 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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:
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
index 68c9e96649..f887d1b27c 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
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
index 27092dc0d6..76a1d5be46 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
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
index eae1a43ed1..04ee1f6b44 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -27,8 +27,8 @@ namespace internal {
*/
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+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,
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
index 6446c403af..e37126109f 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/regex.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/regex.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -102,9 +102,9 @@ class GenericRegexSearch;
- \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
+ \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 <typename Encoding, typename Allocator = CrtAllocator>
class GenericRegex {
@@ -113,9 +113,9 @@ public:
typedef typename Encoding::Ch Ch;
template <typename, typename> 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_(),
+ 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<Encoding> ss(source);
@@ -147,7 +147,7 @@ private:
static const unsigned kRangeNegationFlag = 0x80000000;
struct Range {
- unsigned start; //
+ unsigned start; //
unsigned end;
SizeType next;
};
@@ -402,7 +402,7 @@ private:
}
return false;
- default:
+ default:
// syntax error (e.g. unclosed kLeftParenthesis)
return false;
}
@@ -550,7 +550,7 @@ private:
}
return false;
}
-
+
SizeType NewRange(unsigned codepoint) {
Range* r = ranges_.template Push<Range>();
r->start = r->end = codepoint;
@@ -608,7 +608,7 @@ public:
typedef typename RegexType::EncodingType Encoding;
typedef typename Encoding::Ch Ch;
- GenericRegexSearch(const RegexType& regex, Allocator* allocator = 0) :
+ GenericRegexSearch(const RegexType& regex, Allocator* allocator = 0) :
regex_(regex), allocator_(allocator), ownAllocator_(0),
state0_(allocator, 0), state1_(allocator, 0), stateSet_()
{
@@ -667,7 +667,7 @@ private:
for (const SizeType* s = current->template Bottom<SizeType>(); s != current->template End<SizeType>(); ++s) {
const State& sr = regex_.GetState(*s);
if (sr.codepoint == codepoint ||
- sr.codepoint == RegexType::kAnyCharacterClass ||
+ sr.codepoint == RegexType::kAnyCharacterClass ||
(sr.codepoint == RegexType::kRangeCharacterClass && MatchRange(sr.rangeStart, codepoint)))
{
matched = AddState(*next, sr.out) || matched;
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
index 73abd706e9..ceead44907 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -98,7 +98,7 @@ public:
void Clear() { stackTop_ = stack_; }
- void ShrinkToFit() {
+ void ShrinkToFit() {
if (Empty()) {
// If the stack is empty, completely deallocate the memory.
Allocator::Free(stack_); // NOLINT (+clang-analyzer-unix.Malloc)
@@ -142,7 +142,7 @@ public:
}
template<typename T>
- T* Top() {
+ T* Top() {
RAPIDJSON_ASSERT(GetSize() >= sizeof(T));
return reinterpret_cast<T*>(stackTop_ - sizeof(T));
}
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
index b698a8f43f..1a88f49bba 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -24,7 +24,7 @@ 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.
+ \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 <typename Ch>
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
index 55f0e380bf..62a42c69d8 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -131,14 +131,14 @@ inline bool StrtodFast(double d, int p, double* result) {
template<typename Ch>
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
+ 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<unsigned>(decimals[i] - Ch('0'));
}
-
+
if (i < dLen && decimals[i] >= Ch('5')) // Rounding
significand++;
@@ -185,7 +185,7 @@ inline bool StrtodDiyFp(const Ch* decimals, int dLen, int dExp, double* result)
if (precisionSize + kUlpShift >= 64) {
int scaleExp = (precisionSize + kUlpShift) - 63;
v.f >>= scaleExp;
- v.e += scaleExp;
+ v.e += scaleExp;
error = (error >> scaleExp) + 1 + kUlp;
precisionSize -= scaleExp;
}
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/istreamwrapper.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/istreamwrapper.h
index 01437ec012..23dd83e96c 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/istreamwrapper.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/istreamwrapper.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -44,7 +44,7 @@ RAPIDJSON_NAMESPACE_BEGIN
\tparam StreamType Class derived from \c std::basic_istream.
*/
-
+
template <typename StreamType>
class BasicIStreamWrapper {
public:
@@ -54,7 +54,7 @@ public:
/*!
\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) {
+ BasicIStreamWrapper(StreamType &stream) : stream_(stream), buffer_(peekBuffer_), bufferSize_(4), bufferLast_(0), current_(buffer_), readCount_(0), count_(0), eof_(false) {
Read();
}
@@ -64,7 +64,7 @@ public:
\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) {
+ 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();
}
@@ -75,7 +75,7 @@ public:
// Not implemented
void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
+ void Flush() { RAPIDJSON_ASSERT(false); }
Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorybuffer.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorybuffer.h
index ffbc41ed1f..14aad68636 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorybuffer.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorybuffer.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -27,7 +27,7 @@ RAPIDJSON_NAMESPACE_BEGIN
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.
+ 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.
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h
index 77af6c999e..1bc393f282 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
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
index 18111286bf..1620402e01 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/inttypes.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/inttypes.h
@@ -1,37 +1,37 @@
// ISO C9x compliant inttypes.h for Microsoft Visual Studio
-// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
-//
+// 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,
+// 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").
+// 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 // [
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
index 3d4477b9a0..1c266ecfe6 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/stdint.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/stdint.h
@@ -1,37 +1,37 @@
// ISO C9x compliant stdint.h for Microsoft Visual Studio
-// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
-//
+// 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,
+// 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").
+// 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 // [
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/ostreamwrapper.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/ostreamwrapper.h
index 11ed4d33f9..bfd4d6dab0 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/ostreamwrapper.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/ostreamwrapper.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -40,7 +40,7 @@ RAPIDJSON_NAMESPACE_BEGIN
\tparam StreamType Class derived from \c std::basic_ostream.
*/
-
+
template <typename StreamType>
class BasicOStreamWrapper {
public:
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/pointer.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/pointer.h
index 67a9cb0768..d89f943c91 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/pointer.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/pointer.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -49,16 +49,16 @@ enum PointerParseErrorCode {
//! Represents a JSON Pointer. Use Pointer for UTF8 encoding and default allocator.
/*!
- This class implements RFC 6901 "JavaScript Object Notation (JSON) Pointer"
+ 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
+ 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
+ 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.
@@ -69,10 +69,10 @@ enum PointerParseErrorCode {
supplied tokens eliminates these.
GenericPointer depends on GenericDocument and GenericValue.
-
+
\tparam ValueType The value type of the DOM tree. E.g. GenericValue<UTF8<> >
\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.
*/
@@ -86,7 +86,7 @@ public:
//! A token is the basic units of internal representation.
/*!
- A JSON pointer string representation "/foo/123" is parsed to two tokens:
+ 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).
@@ -94,7 +94,7 @@ public:
(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
+ This struct is public so that user can create a Pointer without parsing and
allocation, using a special constructor.
*/
struct Token {
@@ -373,7 +373,7 @@ public:
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 != 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;
@@ -451,9 +451,9 @@ public:
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
+ 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.
@@ -639,7 +639,7 @@ public:
\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 {
+ const ValueType* Get(const ValueType& root, size_t* unresolvedTokenIndex = 0) const {
return Get(const_cast<ValueType&>(root), unresolvedTokenIndex);
}
@@ -701,7 +701,7 @@ public:
ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& 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 <typename stackAllocator>
@@ -938,7 +938,7 @@ private:
// Count number of '/' as tokenCount
tokenCount_ = 0;
- for (const Ch* s = source; s != source + length; s++)
+ for (const Ch* s = source; s != source + length; s++)
if (*s == '/')
tokenCount_++;
@@ -995,7 +995,7 @@ private:
}
i++;
-
+
// Escaping "~0" -> '~', "~1" -> '/'
if (c == '~') {
if (i < length) {
@@ -1084,7 +1084,7 @@ private:
os.Put('~');
os.Put('1');
}
- else if (uriFragment && NeedPercentEncode(c)) {
+ else if (uriFragment && NeedPercentEncode(c)) {
// Transcode to UTF8 sequence
GenericStringStream<typename ValueType::EncodingType> source(&t->name[j]);
PercentEncodeStream<OutputStream> target(os);
@@ -1102,7 +1102,7 @@ private:
//! 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
+ If it encounters invalid characters, it sets output code unit as 0 and
mark invalid, and to be checked by IsValid().
*/
class PercentDecodeStream {
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h
index fe45df1d10..cea596ef58 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -55,11 +55,11 @@ public:
\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) :
+ 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) :
+ explicit PrettyWriter(StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) :
Base(allocator, levelDepth), indentChar_(' '), indentCharCount_(4), formatOptions_(kFormatDefault) {}
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
@@ -133,13 +133,13 @@ public:
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<typename Base::Level>()->inArray); // currently inside an Array, not Object
RAPIDJSON_ASSERT(0 == Base::level_stack_.template Top<typename Base::Level>()->valueCount % 2); // Object has a Key without a Value
-
+
bool empty = Base::level_stack_.template Pop<typename Base::Level>(1)->valueCount == 0;
if (!empty) {
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h
index a4e8953244..77cede6067 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -17,7 +17,7 @@
/*!\file rapidjson.h
\brief common definitions and configuration
-
+
\see RAPIDJSON_CONFIG
*/
@@ -195,7 +195,7 @@
*/
#ifndef RAPIDJSON_NO_INT64DEFINE
//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-#if defined(_MSC_VER) && (_MSC_VER < 1800) // Visual Studio 2013
+#if defined(_MSC_VER) && (_MSC_VER < 1800) // Visual Studio 2013
#include "msinttypes/stdint.h"
#include "msinttypes/inttypes.h"
#else
@@ -277,7 +277,7 @@
# elif defined(RAPIDJSON_DOXYGEN_RUNNING)
# define RAPIDJSON_ENDIAN
# else
-# error Unknown machine endianness detected. User needs to define RAPIDJSON_ENDIAN.
+# error Unknown machine endianness detected. User needs to define RAPIDJSON_ENDIAN.
# endif
#endif // RAPIDJSON_ENDIAN
@@ -462,7 +462,7 @@ RAPIDJSON_NAMESPACE_END
#if defined(__GNUC__) || defined(__clang__)
#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
#else
-#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE
+#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE
#endif
#ifndef __clang__
//!@endcond
@@ -513,7 +513,7 @@ RAPIDJSON_NAMESPACE_END
//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-#define RAPIDJSON_MULTILINEMACRO_BEGIN do {
+#define RAPIDJSON_MULTILINEMACRO_BEGIN do {
#define RAPIDJSON_MULTILINEMACRO_END \
} while((void)0, 0)
@@ -731,7 +731,7 @@ enum Type {
kFalseType = 1, //!< false
kTrueType = 2, //!< true
kObjectType = 3, //!< object
- kArrayType = 4, //!< array
+ kArrayType = 4, //!< array
kStringType = 5, //!< string
kNumberType = 6 //!< number
};
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/schema.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/schema.h
index f0759ffcf5..1db4b57cbf 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/schema.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/schema.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -256,10 +256,10 @@ public:
bool Uint(unsigned u) { Number n; n.u.u = u; n.d = static_cast<double>(u); return WriteNumber(n); }
bool Int64(int64_t i) { Number n; n.u.i = i; n.d = static_cast<double>(i); return WriteNumber(n); }
bool Uint64(uint64_t u) { Number n; n.u.u = u; n.d = static_cast<double>(u); return WriteNumber(n); }
- bool Double(double d) {
- Number n;
+ bool Double(double d) {
+ Number n;
if (d < 0) n.u.i = static_cast<int64_t>(d);
- else n.u.u = static_cast<uint64_t>(d);
+ else n.u.u = static_cast<uint64_t>(d);
n.d = d;
return WriteNumber(n);
}
@@ -276,7 +276,7 @@ public:
bool StartObject() { return true; }
bool Key(const Ch* str, SizeType len, bool copy) { return String(str, len, copy); }
- bool EndObject(SizeType memberCount) {
+ bool EndObject(SizeType memberCount) {
uint64_t h = Hash(0, kObjectType);
uint64_t* kv = stack_.template Pop<uint64_t>(memberCount * 2);
for (SizeType i = 0; i < memberCount; i++)
@@ -284,9 +284,9 @@ public:
*stack_.template Push<uint64_t>() = h;
return true;
}
-
+
bool StartArray() { return true; }
- bool EndArray(SizeType elementCount) {
+ bool EndArray(SizeType elementCount) {
uint64_t h = Hash(0, kArrayType);
uint64_t* e = stack_.template Pop<uint64_t>(elementCount);
for (SizeType i = 0; i < elementCount; i++)
@@ -313,9 +313,9 @@ private:
};
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);
@@ -1987,7 +1987,7 @@ template <
typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>,
typename StateAllocator = CrtAllocator>
class GenericSchemaValidator :
- public internal::ISchemaStateFactory<typename SchemaDocumentType::SchemaType>,
+ public internal::ISchemaStateFactory<typename SchemaDocumentType::SchemaType>,
public internal::ISchemaValidator,
public internal::IValidationErrorHandler<typename SchemaDocumentType::SchemaType> {
public:
@@ -2008,7 +2008,7 @@ public:
*/
GenericSchemaValidator(
const SchemaDocumentType& schemaDocument,
- StateAllocator* allocator = 0,
+ StateAllocator* allocator = 0,
size_t schemaStackCapacity = kDefaultSchemaStackCapacity,
size_t documentStackCapacity = kDefaultDocumentStackCapacity)
:
@@ -2040,7 +2040,7 @@ public:
GenericSchemaValidator(
const SchemaDocumentType& schemaDocument,
OutputHandler& outputHandler,
- StateAllocator* allocator = 0,
+ StateAllocator* allocator = 0,
size_t schemaStackCapacity = kDefaultSchemaStackCapacity,
size_t documentStackCapacity = kDefaultDocumentStackCapacity)
:
@@ -2390,7 +2390,7 @@ RAPIDJSON_MULTILINEMACRO_END
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);
@@ -2398,7 +2398,7 @@ RAPIDJSON_MULTILINEMACRO_END
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));
@@ -2411,7 +2411,7 @@ RAPIDJSON_MULTILINEMACRO_END
RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(StartArray, ());
return valid_ = !outputHandler_ || outputHandler_->StartArray();
}
-
+
bool EndArray(SizeType elementCount) {
if (!valid_) return false;
RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndArray, (elementCount));
@@ -2468,7 +2468,7 @@ private:
typedef GenericValue<UTF8<>, StateAllocator> HashCodeArray;
typedef internal::Hasher<EncodingType, StateAllocator> HasherType;
- GenericSchemaValidator(
+ GenericSchemaValidator(
const SchemaDocumentType& schemaDocument,
const SchemaType& root,
const char* basePath, size_t basePathSize,
@@ -2554,7 +2554,7 @@ private:
#endif
void* hasher = CurrentContext().hasher;
uint64_t h = hasher && CurrentContext().arrayUniqueness ? static_cast<HasherType*>(hasher)->GetHashCode() : 0;
-
+
PopSchema();
if (!schemaStack_.Empty()) {
@@ -2603,7 +2603,7 @@ private:
}
RAPIDJSON_FORCEINLINE void PushSchema(const SchemaType& schema) { new (schemaStack_.template Push<Context>()) Context(*this, *this, &schema); }
-
+
RAPIDJSON_FORCEINLINE void PopSchema() {
Context* c = schemaStack_.template Pop<Context>(1);
if (HashCodeArray* a = static_cast<HashCodeArray*>(c->arrayElementHashCodes)) {
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h
index 82ad3ca6bb..17bfeac9f3 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/writer.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/writer.h
index 8b389219ab..81f34fc80d 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/writer.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/writer.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -52,7 +52,7 @@ RAPIDJSON_NAMESPACE_BEGIN
///////////////////////////////////////////////////////////////////////////////
// WriteFlag
-/*! \def RAPIDJSON_WRITE_DEFAULT_FLAGS
+/*! \def RAPIDJSON_WRITE_DEFAULT_FLAGS
\ingroup RAPIDJSON_CONFIG
\brief User-defined kWriteDefaultFlags definition.
@@ -76,7 +76,7 @@ enum WriteFlag {
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,
+ On the other side, a writer can also be passed to objects that generates events,
for example Reader::Parse() and Document::Accept().
@@ -99,7 +99,7 @@ public:
\param levelDepth Initial capacity of stack.
*/
explicit
- Writer(OutputStream& os, StackAllocator* stackAllocator = 0, size_t levelDepth = kDefaultLevelDepth) :
+ Writer(OutputStream& os, StackAllocator* stackAllocator = 0, size_t levelDepth = kDefaultLevelDepth) :
os_(&os), level_stack_(stackAllocator, levelDepth * sizeof(Level)), maxDecimalPlaces_(kDefaultMaxDecimalPlaces), hasRoot_(false) {}
explicit
@@ -153,7 +153,7 @@ public:
/*!
This setting truncates the output with specified number of decimal places.
- For example,
+ For example,
\code
writer.SetMaxDecimalPlaces(3);
@@ -258,7 +258,7 @@ public:
//! 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.
@@ -425,7 +425,7 @@ protected:
PutUnsafe(*os_, hexDigits[(trail >> 12) & 15]);
PutUnsafe(*os_, hexDigits[(trail >> 8) & 15]);
PutUnsafe(*os_, hexDigits[(trail >> 4) & 15]);
- PutUnsafe(*os_, hexDigits[(trail ) & 15]);
+ PutUnsafe(*os_, hexDigits[(trail ) & 15]);
}
}
else if ((sizeof(Ch) == 1 || static_cast<unsigned>(c) < 256) && RAPIDJSON_UNLIKELY(escape[static_cast<unsigned char>(c)])) {
@@ -439,7 +439,7 @@ protected:
PutUnsafe(*os_, hexDigits[static_cast<unsigned char>(c) & 0xF]);
}
}
- else if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ?
+ else if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ?
Transcoder<SourceEncoding, TargetEncoding>::Validate(is, *os_) :
Transcoder<SourceEncoding, TargetEncoding>::TranscodeUnsafe(is, *os_))))
return false;
@@ -462,7 +462,7 @@ protected:
GenericStringStream<SourceEncoding> is(json);
while (RAPIDJSON_LIKELY(is.Tell() < length)) {
RAPIDJSON_ASSERT(is.Peek() != '\0');
- if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ?
+ if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ?
Transcoder<SourceEncoding, TargetEncoding>::Validate(is, *os_) :
Transcoder<SourceEncoding, TargetEncoding>::TranscodeUnsafe(is, *os_))))
return false;
@@ -475,7 +475,7 @@ protected:
if (RAPIDJSON_LIKELY(level_stack_.GetSize() != 0)) { // this value is not at root
Level* level = level_stack_.template Top<Level>();
if (level->valueCount > 0) {
- if (level->inArray)
+ 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) ? ',' : ':');
@@ -563,7 +563,7 @@ inline bool Writer<StringBuffer>::WriteDouble(double d) {
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<size_t>(25 - (end - buffer)));
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/misctest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/misctest.cpp
index f43b050181..f7bf8a985f 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/misctest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/misctest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -50,7 +50,7 @@ static const unsigned char utf8d[] = {
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,
+ 12,36,12,12,12,12,12,12,12,12,12,12,
};
static unsigned inline decode(unsigned* state, unsigned* codep, unsigned byte) {
@@ -890,7 +890,7 @@ void itoa64_Writer_InsituStringStream() {
OUTPUT_LENGTH(length);
};
-// Full specialization for InsituStringStream to prevent memory copying
+// Full specialization for InsituStringStream to prevent memory copying
// (normally we will not use InsituStringStream for writing, just for testing)
namespace rapidjson {
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.cpp
index b149a4c12c..13d7b8a3e4 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.h b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.h
index 31e3ca6337..01fc1eb5e2 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/platformtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/platformtest.cpp
index c490da7a85..ff7bf4fea9 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/platformtest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/platformtest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -91,14 +91,14 @@ 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) {
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/rapidjsontest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/rapidjsontest.cpp
index ce41c109ab..5afefcbecb 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/rapidjsontest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/rapidjsontest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp
index 2ffc325426..4f08cad48e 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp
index fad54382ca..b448b4dce2 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp
index ad465e1f31..3e9cfc2415 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp
index c3d1e484dc..74432ba39a 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -176,7 +176,7 @@ TEST(Document, Parse_Encoding) {
typedef GenericDocument<UTF16<> > DocumentType;
DocumentType doc;
-
+
// Parse<unsigned, SourceEncoding>(const SourceEncoding::Ch*)
// doc.Parse<kParseDefaultFlags, UTF8<> >(json);
// EXPECT_FALSE(doc.HasParseError());
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp
index 3ec8982898..69e2256b6c 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp
index d9b87e94cd..52e5040bb0 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -39,7 +39,7 @@ public:
private:
EncodedStreamTest(const EncodedStreamTest&);
EncodedStreamTest& operator=(const EncodedStreamTest&);
-
+
protected:
static FILE* Open(const char* filename) {
const char *paths[] = {
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp
index 455881e7e8..ab0175a780 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -259,7 +259,7 @@ static const unsigned char utf8d[] = {
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,
+ 12,36,12,12,12,12,12,12,12,12,12,12,
};
static unsigned inline decode(unsigned* state, unsigned* codep, unsigned byte) {
@@ -377,7 +377,7 @@ TEST(EncodingsTest, UTF16) {
unsigned decodedCodepoint;
bool result = UTF16<>::Decode(is, &decodedCodepoint);
EXPECT_TRUE(result);
- EXPECT_EQ(codepoint, decodedCodepoint);
+ EXPECT_EQ(codepoint, decodedCodepoint);
if (!result || codepoint != decodedCodepoint)
std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl;
}
@@ -408,7 +408,7 @@ TEST(EncodingsTest, UTF32) {
unsigned decodedCodepoint;
bool result = UTF32<>::Decode(is, &decodedCodepoint);
EXPECT_TRUE(result);
- EXPECT_EQ(codepoint, decodedCodepoint);
+ EXPECT_EQ(codepoint, decodedCodepoint);
if (!result || codepoint != decodedCodepoint)
std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl;
}
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp
index de0b4d1a4a..34da56cef8 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -77,7 +77,7 @@ public:
private:
FileStreamTest(const FileStreamTest&);
FileStreamTest& operator=(const FileStreamTest&);
-
+
protected:
const char* filename_;
char *json_;
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp
index e9c707805a..62ab5a0344 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -103,7 +103,7 @@ struct Foo {
typedef Transcoder<UTF8<>, UTF8<> > TranscoderUtf8ToUtf8;
typedef BaseReaderHandler<UTF8<>, void> BaseReaderHandlerUtf8Void;
-Foo::Foo() :
+Foo::Foo() :
// encodings.h
utf8(RAPIDJSON_NEW(UTF8<>)),
utf16(RAPIDJSON_NEW(UTF16<>)),
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp
index f0cdb2d38c..57634caf4d 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp
index 19e1f1c47a..aadce0a060 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -104,7 +104,7 @@ TEST(JsonChecker, Reader) {
break;
}
EXPECT_TRUE(reader.HasParseError()) << filename;
-
+
free(json);
}
@@ -126,7 +126,7 @@ TEST(JsonChecker, Reader) {
// Test iterative parsing.
document.Parse<kParseIterativeFlag>(json);
EXPECT_FALSE(document.HasParseError()) << filename;
-
+
// Test iterative pull-parsing.
Reader reader;
StringStream ss(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
index e33e6d5f54..2755d6f16f 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/namespacetest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/namespacetest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,14 +7,14 @@
//
// 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
+// 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
+// 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 {
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp
index c9bc5f4bfb..ec809e2edc 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -77,7 +77,7 @@ static void TestFileStream() {
}
fp = fopen(filename, "r");
- ASSERT_TRUE( fp != NULL );
+ ASSERT_TRUE( fp != NULL );
for (const char* p = s; *p; p++)
EXPECT_EQ(*p, static_cast<char>(fgetc(fp)));
fclose(fp);
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp
index 05eba3f5bd..e03fe8f099 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,15 +7,15 @@
//
// 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
+// 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
+// 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 <windows.h>
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp
index 342086dd10..4173f15e7e 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -475,7 +475,7 @@ TEST(Pointer, CopyConstructor) {
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());
}
@@ -837,7 +837,7 @@ 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());
@@ -896,7 +896,7 @@ TEST(Pointer, Set) {
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());
@@ -1727,4 +1727,4 @@ TEST(Pointer, Issue1899) {
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
index 0b7feef3b2..3b3608097c 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/prettywritertest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/prettywritertest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -150,15 +150,15 @@ private:
// For covering PutN() generic version
TEST(PrettyWriter, OStreamWrapper) {
StringStream s(kJson);
-
+
std::stringstream ss;
OStreamWrapper os(ss);
-
+
PrettyWriter<OStreamWrapper> writer(os);
Reader reader;
reader.Parse(s, writer);
-
+
std::string actual = ss.str();
EXPECT_STREQ(kPrettyJson, actual.c_str());
}
@@ -217,7 +217,7 @@ TEST(PrettyWriter, InvalidEventSequence) {
EXPECT_THROW(writer.EndArray(), AssertException);
EXPECT_FALSE(writer.IsComplete());
}
-
+
// [}
{
StringBuffer buffer;
@@ -226,7 +226,7 @@ TEST(PrettyWriter, InvalidEventSequence) {
EXPECT_THROW(writer.EndObject(), AssertException);
EXPECT_FALSE(writer.IsComplete());
}
-
+
// { 1:
{
StringBuffer buffer;
@@ -235,7 +235,7 @@ TEST(PrettyWriter, InvalidEventSequence) {
EXPECT_THROW(writer.Int(1), AssertException);
EXPECT_FALSE(writer.IsComplete());
}
-
+
// { 'a' }
{
StringBuffer buffer;
@@ -245,7 +245,7 @@ TEST(PrettyWriter, InvalidEventSequence) {
EXPECT_THROW(writer.EndObject(), AssertException);
EXPECT_FALSE(writer.IsComplete());
}
-
+
// { 'a':'b','c' }
{
StringBuffer buffer;
@@ -304,13 +304,13 @@ TEST(PrettyWriter, Inf) {
TEST(PrettyWriter, Issue_889) {
char buf[100] = "Hello";
-
+
StringBuffer buffer;
PrettyWriter<StringBuffer> writer(buffer);
writer.StartArray();
writer.String(buf);
writer.EndArray();
-
+
EXPECT_STREQ("[\n \"Hello\"\n]", buffer.GetString());
EXPECT_TRUE(writer.IsComplete()); \
}
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp
index a288622bc7..2296ba2980 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -404,7 +404,7 @@ TEST(Regex, QuantifierMinMax5) {
#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");
+ Regex re("a" EURO "+b");
ASSERT_TRUE(re.IsValid());
RegexSearch rs(re);
EXPECT_TRUE(rs.Match("a" EURO "b"));
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp
index 1b25e2f44e..92c1b72384 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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
@@ -192,7 +192,7 @@ 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);
@@ -1030,7 +1030,7 @@ TEST(SchemaValidator, 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);
+ 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,"
@@ -2089,9 +2089,9 @@ TEST(SchemaValidator, ValidateMetaSchema_UTF16) {
template <typename SchemaDocumentType = SchemaDocument>
class RemoteSchemaDocumentProvider : public IGenericRemoteSchemaDocumentProvider<SchemaDocumentType> {
public:
- RemoteSchemaDocumentProvider() :
- documentAllocator_(documentBuffer_, sizeof(documentBuffer_)),
- schemaAllocator_(schemaBuffer_, sizeof(schemaBuffer_))
+ RemoteSchemaDocumentProvider() :
+ documentAllocator_(documentBuffer_, sizeof(documentBuffer_)),
+ schemaAllocator_(schemaBuffer_, sizeof(schemaBuffer_))
{
const char* filenames[kCount] = {
"jsonschema/remotes/integer.json",
@@ -2402,11 +2402,11 @@ TEST(SchemaValidator, Issue1017_allOfHandler) {
GenericSchemaValidator<SchemaDocument, Writer<StringBuffer> > 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.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.StartArray());
+ EXPECT_TRUE(validator.EndArray(0));
EXPECT_TRUE(validator.EndObject(0));
EXPECT_TRUE(validator.IsValid());
EXPECT_STREQ("{\"cyanArray2\":[],\"blackArray\":[]}", sb.GetString());
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp
index 649505fab2..924fd5c1b3 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp
index 411269396a..a8d0aad158 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp
index eaa29e715e..a7ec2b6af6 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp
index 66167a4a35..2fcb63524f 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -117,7 +117,7 @@ TEST(Strtod, CheckApproximationCase) {
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);
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp
index 879976a782..c5b6f2710a 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h
index 0e64d3970b..567389a17a 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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_
@@ -85,7 +85,7 @@ inline FILE* TempFile(char *filename) {
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");
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp
index 0a6b325f4b..6ef22b7260 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -161,7 +161,7 @@ TEST(Value, AssignmentOperator) {
#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
}
-template <typename A, typename B>
+template <typename A, typename B>
void TestEqual(const A& a, const B& b) {
EXPECT_TRUE (a == b);
EXPECT_FALSE(a != b);
@@ -169,7 +169,7 @@ void TestEqual(const A& a, const B& b) {
EXPECT_FALSE(b != a);
}
-template <typename A, typename B>
+template <typename A, typename B>
void TestUnequal(const A& a, const B& b) {
EXPECT_FALSE(a == b);
EXPECT_TRUE (a != b);
@@ -1060,7 +1060,7 @@ static void TestArray(T& x, Allocator& allocator) {
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);
@@ -1345,7 +1345,7 @@ static void TestObject(T& x, Allocator& allocator) {
#endif
// member iterator
- Value::MemberIterator itr = x.MemberBegin();
+ Value::MemberIterator itr = x.MemberBegin();
EXPECT_TRUE(itr != x.MemberEnd());
EXPECT_STREQ("A", itr->name.GetString());
EXPECT_STREQ("Apple", itr->value.GetString());
@@ -1361,7 +1361,7 @@ static void TestObject(T& x, Allocator& allocator) {
EXPECT_FALSE(itr != x.MemberEnd());
// const member iterator
- Value::ConstMemberIterator citr = y.MemberBegin();
+ Value::ConstMemberIterator citr = y.MemberBegin();
EXPECT_TRUE(citr != y.MemberEnd());
EXPECT_STREQ("A", citr->name.GetString());
EXPECT_STREQ("Apple", citr->value.GetString());
@@ -1556,7 +1556,7 @@ TEST(Value, ObjectHelper) {
EXPECT_STREQ("apple", y["a"].GetString());
EXPECT_TRUE(x.IsObject()); // Invariant
}
-
+
{
Value x(kObjectType);
x.AddMember("a", "apple", allocator);
@@ -1674,7 +1674,7 @@ TEST(Value, BigNestedObject) {
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);
@@ -1689,8 +1689,8 @@ TEST(Value, BigNestedObject) {
TEST(Value, RemoveLastElement) {
rapidjson::Document doc;
rapidjson::Document::AllocatorType& allocator = doc.GetAllocator();
- rapidjson::Value objVal(rapidjson::kObjectType);
- objVal.AddMember("var1", 123, allocator);
+ 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"));
@@ -1712,22 +1712,22 @@ TEST(Document, CrtAllocator) {
static void TestShortStringOptimization(const char* str) {
const rapidjson::SizeType len = static_cast<rapidjson::SizeType>(strlen(str));
-
+
rapidjson::Document doc;
rapidjson::Value val;
val.SetString(str, len, doc.GetAllocator());
-
- EXPECT_EQ(val.GetStringLength(), len);
- EXPECT_STREQ(val.GetString(), str);
+
+ 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)
+ 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 <int e>
@@ -1802,7 +1802,7 @@ static void MergeDuplicateKey(Value& v, Value::AllocatorType& a) {
// 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);
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp
index ac9ad899e1..bfbd71c4c9 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp
@@ -1,5 +1,5 @@
// 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
@@ -7,9 +7,9 @@
//
// 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
+// 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"
@@ -102,13 +102,13 @@ TEST(Writer, String) {
TEST(Writer, Issue_889) {
char buf[100] = "Hello";
-
+
StringBuffer buffer;
Writer<StringBuffer> writer(buffer);
writer.StartArray();
writer.String(buf);
writer.EndArray();
-
+
EXPECT_STREQ("[\"Hello\"]", buffer.GetString());
EXPECT_TRUE(writer.IsComplete()); \
}
@@ -220,15 +220,15 @@ private:
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<OStreamWrapper> 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());
}
@@ -449,7 +449,7 @@ TEST(Writer, InvalidEventSequence) {
EXPECT_FALSE(writer.IsComplete());
}
- // { 1:
+ // { 1:
{
StringBuffer buffer;
Writer<StringBuffer> writer(buffer);
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/CHANGE_LOG b/graphics/asymptote/LspCpp/third_party/threadpool/CHANGE_LOG
deleted file mode 100644
index 635fbcfde5..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/CHANGE_LOG
+++ /dev/null
@@ -1,88 +0,0 @@
-Change Log
-
-0.2.5
- - Made threadpool compatible to boost::thread 1.37
- - Fixed hang problem in shutdown method (Thanks to Sohail Somani)
- - Adapted repository layout to boost (Thanks to Alex Ott)
-
-0.2.4 (Stable)
- - Made threadpool compatible to boost::thread 1.35.x code base
- - Fixed compiler warning in scope_guard.hpp
-
-0.2.3 (Development)
- - Implemented workaround for Sun C++ Pro compiler bug in pool_core
- - Removed subtask implementation (there was no demand for this feature)
- - Improved shutdown policies
-
-0.2.2 (Development)
- - Refactored SizePolicy and added SizePolicyController
- - Moved policies into separate files
- - Fixed some compiler problems (GCC)
- - Implemented size_controller handling
- - Implemented two size policies: static_size and fixed_size
- - Refactored worker_thread handling, moved policies from pool_core to pool
- - Specialized schedule function for usage with futures
- - Added compile test project
- - Improved constness in pool core class
- - Fixed timed wait
- - Implemented futures (in progress)
- - Added result_type to all functors
-
-0.2.1 (Development)
- - Pool base class (thread_pool) has now reference semantics
- - Large refactorings: Removed scoped_pool, reimplemented worker (now worker_thread)
- - Fixed odd resize behaviour. Now resize changes the number of threads immediately
- - Apply pimpl idiom on pool core class (to make the ugly scoped_pool class needless)
- - Introduced scheduling policies
- - Switched to policy-based design (PBD), inspired by Scott Meyers C++ workshop
- - Cosmetic code change: Replaced keyword 'class' with 'typename' in template definitions
- - Revised tutorials
- - New requirements: tasks functions should not and schedulers shall not throw exceptions
-
-
-0.2.0 (Development)
- - Moved threadpool into the boost namespace: boost::threadpool
- - Used keyword volatile to indicate thread-safe member functions
- - Used volatile on primitve types were appropriate
- - Moved worker to detail directory
- - Fixed thread deletion
- - Extended wait functionality (waiting for idle threads was implemented)
- - Renamed 'join()' to 'wait()' as 'join' indicates the termination of thread. That was not the case in pool::join.
- - Changed internal container of lifo and fifo schedulers to improve efficiency.
- - Improved code reference documentation (source code browser)
- - Renamed thread_func into task_func
- - Added += operator to scoped_pool to ease scheduling of tasks
- - Refactored file structures and class names
- - Added a new task concept (named subtask) which allows the combination of sequential and parallel execution
- - Added new task adaptor for looped or timed tasks: looped_task_func
- - Introduced function clear() which can be used to remove all tasks from the pool and schedulers
- - New function pool::active() which returns the number of active tasks
-
-0.1.8 (Development)
- - Fixed some compile errors which were reported by gcc
- - Wrote tutorial "Prioritized Tasks"
-
-0.1.7 (Development)
- - Added Visual Studio 2005 project files for tutorial and examples
-
-0.1.6 (Development)
- - Replaced task adaptor 'task' with boost::bind
- - Workers are unregistered from thread_group when they are terminated
- - Working on example boost::iostreams packet_filter
-
-0.1.5 (Development)
- - Finished threadpool reference
- - Class pool_adaptor was replaced by smart_pool
- - Minor pool improvements
- - First tutorial page online
-
-0.1.4 (Development)
- - Created the pool's homepage: http://threadpool.sourceforge.net
- - Improved documentation
- - Added build scripts
-
-0.1.3 (Development)
- - First public release
- - Added mergesort example
- - Added tutorial
- - Implementation of threadpool core and related classes \ No newline at end of file
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/COPYING b/graphics/asymptote/LspCpp/third_party/threadpool/COPYING
deleted file mode 100644
index 06bdc4605a..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/COPYING
+++ /dev/null
@@ -1,5 +0,0 @@
-Copyright (c) 2005-2007 Philipp Henkel
-
-Use, modification, and distribution are subject to 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) \ No newline at end of file
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/Jamfile.v2 b/graphics/asymptote/LspCpp/third_party/threadpool/Jamfile.v2
deleted file mode 100644
index 56c8549755..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/Jamfile.v2
+++ /dev/null
@@ -1,13 +0,0 @@
-use-project /boost
- : $(BOOST_ROOT)
- ;
-
-project threadpool
- : requirements <include>.&&$(BOOST_ROOT)
- # disable auto-linking for all targets here,
- # primarily because it caused troubles with V2
- <define>BOOST_ALL_NO_LIB=1
- : usage-requirements <include>.&&$(BOOST_ROOT)
- : build-dir bin.v2
- ;
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/Jamrules b/graphics/asymptote/LspCpp/third_party/threadpool/Jamrules
deleted file mode 100644
index 8571a1461c..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/Jamrules
+++ /dev/null
@@ -1 +0,0 @@
-project boost : $(BOOST_ROOT) ;
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/LICENSE_1_0.txt b/graphics/asymptote/LspCpp/third_party/threadpool/LICENSE_1_0.txt
deleted file mode 100644
index 36b7cd93cd..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/LICENSE_1_0.txt
+++ /dev/null
@@ -1,23 +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.
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/Makefile b/graphics/asymptote/LspCpp/third_party/threadpool/Makefile
deleted file mode 100644
index 9acf23b272..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-export RELEASE_MANAGER=philipphenkel
-export RELEASE_VERSION=0_2_5
-
-doc: clean
- make --directory=./libs/threadpool/doc --print-directory doc
-
-release_doc:
- make --directory=./libs/threadpool/doc --print-directory release_doc
-
-release_src: clean fetch_clean_src
- mv clean_src threadpool-$(RELEASE_VERSION)-src
- zip -r9 threadpool-$(RELEASE_VERSION)-src.zip threadpool-$(RELEASE_VERSION)-src
- rm -rf threadpool-$(RELEASE_VERSION)-src
-
-deploy_website:
- make --directory=./libs/threadpool/doc --print-directory deploy_sf
-
-clean:
- rm -rf clean_src
- rm -rf threadpool-$(RELEASE_VERSION)-src.zip
- rm -rf threadpool-$(RELEASE_VERSION)-doc.zip
- make --directory=./libs/threadpool/doc --print-directory clean
-
-fetch_clean_src:
- rm -rf clean_src
- mkdir clean_src
-# cvs -d:pserver:anonymous@threadpool.cvs.sourceforge.net:/cvsroot/threadpool login
- cd clean_src; cvs -z3 -d:pserver:anonymous@threadpool.cvs.sourceforge.net:/cvsroot/threadpool export -r RELEASE_$(RELEASE_VERSION) threadpool
-# cd clean_src; cvs -z3 -d:ext:$(RELEASE_MANAGER)@cvs.sourceforge.net:/cvsroot/threadpool export -r RELEASE_$(RELEASE_VERSION) threadpool
-
-
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/README b/graphics/asymptote/LspCpp/third_party/threadpool/README
deleted file mode 100644
index c6f1a83d81..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/README
+++ /dev/null
@@ -1,10 +0,0 @@
-threadpool
-
-Copyright (c) 2005-2007 Philipp Henkel
-
-threadpool is a cross-platform C++ thread pool library and released under the Boost Software License.
-
-See doc/index.html for information on:
- - API documentation and a tutorial
- - External dependencies
- - Using threadpool
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/TODO b/graphics/asymptote/LspCpp/third_party/threadpool/TODO
deleted file mode 100644
index 1c5e6e26d6..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/TODO
+++ /dev/null
@@ -1,36 +0,0 @@
-threadpool to-do items
-======================
-
-Documentation
---------------------------------------------
-- Source code documentation
-- Design rationale
-- Tutorial
-- Finish Quickstart Tutorial/Example
-
-Functionality
---------------------------------------------
-- Implement a size policy which dynamically
- increase/decrease the pool's size:
- - init with min/max threads
- - auto increase
- - auto decrease (using timed cleanup tasks)
-- Add some kind of deadline scheduler
-- Add futures to pool
-
-
-Examples
---------------------------------------------
-- Buffering Client Requests: Handle 'bursty' client traffic
- Some applications need more buffering than is provided by OS I/O subsystem
-
- Working on 'active' buffer for boost::iostreams
- buffer_filter which provides a dynamic amount of buffer objects.
- buffer_filter uses a threadpool with one thread which provides the buffers to
- consumer. (TODO Philipp)
-
- 2nd implemention step:
- Flexbile configuration: Buffer capacities can be configured according to
- - maximum number of requests
- - maximum number of bytes
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool.hpp
deleted file mode 100644
index 7d9ee48010..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool.hpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*! \file
-* \brief Main include.
-*
-* This is the only file you have to include in order to use the
-* complete threadpool library.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-#ifndef THREADPOOL_HPP_INCLUDED
-#define THREADPOOL_HPP_INCLUDED
-
-#include "./threadpool/future.hpp"
-#include "./threadpool/pool.hpp"
-
-#include "./threadpool/pool_adaptors.hpp"
-#include "./threadpool/task_adaptors.hpp"
-
-
-#endif // THREADPOOL_HPP_INCLUDED
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/future.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/future.hpp
deleted file mode 100644
index 4e4b35bebe..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/future.hpp
+++ /dev/null
@@ -1,215 +0,0 @@
-/*! \file
-* \brief TODO.
-*
-* TODO.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-
-#ifndef THREADPOOL_DETAIL_FUTURE_IMPL_HPP_INCLUDED
-#define THREADPOOL_DETAIL_FUTURE_IMPL_HPP_INCLUDED
-
-
-#include "locking_ptr.hpp"
-
-#include <boost/smart_ptr.hpp>
-#include <boost/optional.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/condition.hpp>
-#include <boost/thread/xtime.hpp>
-#include <boost/utility/result_of.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits.hpp>
-
-namespace boost { namespace threadpool { namespace detail
-{
-
-template<class Result>
-class future_impl
-{
-public:
- typedef Result const & result_type; //!< Indicates the functor's result type.
-
- typedef Result future_result_type; //!< Indicates the future's result type.
- typedef future_impl<future_result_type> future_type;
-
-private:
- volatile bool m_ready;
- volatile future_result_type m_result;
-
- mutable mutex m_monitor;
- mutable condition m_condition_ready;
-
- volatile bool m_is_cancelled;
- volatile bool m_executing;
-
-public:
-
-
-public:
-
- future_impl()
- : m_ready(false)
- , m_is_cancelled(false)
- {
- }
-
- bool ready() const volatile
- {
- return m_ready;
- }
-
- void wait() const volatile
- {
- const future_type* self = const_cast<const future_type*>(this);
- mutex::scoped_lock lock(self->m_monitor);
-
- while(!m_ready)
- {
- self->m_condition_ready.wait(lock);
- }
- }
-
-
- bool timed_wait(boost::xtime const & timestamp) const
- {
- const future_type* self = const_cast<const future_type*>(this);
- mutex::scoped_lock lock(self->m_monitor);
-
- while(!m_ready)
- {
- if(!self->m_condition_ready.timed_wait(lock, timestamp)) return false;
- }
-
- return true;
- }
-
-
- result_type operator()() const volatile
- {
- wait();
-/*
- if( throw_exception_ != 0 )
- {
- throw_exception_( this );
- }
-*/
-
- return *(const_cast<const future_result_type*>(&m_result));
- }
-
-
- void set_value(future_result_type const & r) volatile
- {
- locking_ptr<future_type, mutex> lockedThis(*this, m_monitor);
- if(!m_ready && !m_is_cancelled)
- {
- lockedThis->m_result = r;
- lockedThis->m_ready = true;
- lockedThis->m_condition_ready.notify_all();
- }
- }
-/*
- template<class E> void set_exception() // throw()
- {
- m_impl->template set_exception<E>();
- }
-
- template<class E> void set_exception( char const * what ) // throw()
- {
- m_impl->template set_exception<E>( what );
- }
- */
-
-
- bool cancel() volatile
- {
- if(!m_ready || m_executing)
- {
- m_is_cancelled = true;
- return true;
- }
- else
- {
- return false;
- }
- }
-
-
- bool is_cancelled() const volatile
- {
- return m_is_cancelled;
- }
-
-
- void set_execution_status(bool executing) volatile
- {
- m_executing = executing;
- }
-};
-
-
-template<
- template <typename> class Future,
- typename Function
->
-class future_impl_task_func
-{
-
-public:
- typedef void result_type; //!< Indicates the functor's result type.
-
- typedef Function function_type; //!< Indicates the function's type.
- typedef typename result_of<function_type()>::type future_result_type; //!< Indicates the future's result type.
- typedef Future<future_result_type> future_type; //!< Indicates the future's type.
-
- // The task is required to be a nullary function.
- BOOST_STATIC_ASSERT(function_traits<function_type()>::arity == 0);
-
- // The task function's result type is required not to be void.
- BOOST_STATIC_ASSERT(!is_void<future_result_type>::value);
-
-private:
- function_type m_function;
- shared_ptr<future_type> m_future;
-
-public:
- future_impl_task_func(function_type const & function, shared_ptr<future_type> const & future)
- : m_function(function)
- , m_future(future)
- {
- }
-
- void operator()()
- {
- if(m_function)
- {
- m_future->set_execution_status(true);
- if(!m_future->is_cancelled())
- {
- // TODO future exeception handling
- m_future->set_value(m_function());
- }
- m_future->set_execution_status(false); // TODO consider exceptions
- }
- }
-
-};
-
-
-
-
-
-} } } // namespace boost::threadpool::detail
-
-#endif // THREADPOOL_DETAIL_FUTURE_IMPL_HPP_INCLUDED
-
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/locking_ptr.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/locking_ptr.hpp
deleted file mode 100644
index 57ba560b5a..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/locking_ptr.hpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*! \file
-* \brief The locking_ptr is smart pointer with a scoped locking mechanism.
-*
-* The class is a wrapper for a volatile pointer. It enables synchronized access to the
-* internal pointer by locking the passed mutex.
-* locking_ptr is based on Andrei Alexandrescu's LockingPtr. For more information
-* see article "volatile - Multithreaded Programmer's Best Friend" by A. Alexandrescu.
-*
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-
-#ifndef THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED
-#define THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED
-
-#include <boost/utility.hpp>
-#include <boost/thread/mutex.hpp>
-
-
-namespace boost { namespace threadpool { namespace detail
-{
-
-/*! \brief Smart pointer with a scoped locking mechanism.
- *
- * This class is a wrapper for a volatile pointer. It enables synchronized access to the
- * internal pointer by locking the passed mutex.
- */
- template <typename T, typename Mutex>
- class locking_ptr
- : private noncopyable
- {
- T* m_obj; //!< The instance pointer.
- Mutex & m_mutex; //!< Mutex is used for scoped locking.
-
- public:
- /// Constructor.
- locking_ptr(volatile T& obj, const volatile Mutex& mtx)
- : m_obj(const_cast<T*>(&obj))
- , m_mutex(*const_cast<Mutex*>(&mtx))
- {
- // Lock mutex
- m_mutex.lock();
- }
-
-
- /// Destructor.
- ~locking_ptr()
- {
- // Unlock mutex
- m_mutex.unlock();
- }
-
-
- /*! Returns a reference to the stored instance.
- * \return The instance's reference.
- */
- T& operator*() const
- {
- return *m_obj;
- }
-
-
- /*! Returns a pointer to the stored instance.
- * \return The instance's pointer.
- */
- T* operator->() const
- {
- return m_obj;
- }
- };
-
-
-} } } // namespace boost::threadpool::detail
-
-
-#endif // THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/pool_core.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/pool_core.hpp
deleted file mode 100644
index a81df87763..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/pool_core.hpp
+++ /dev/null
@@ -1,453 +0,0 @@
-/*! \file
-* \brief Thread pool core.
-*
-* This file contains the threadpool's core class: pool<Task, SchedulingPolicy>.
-*
-* Thread pools are a mechanism for asynchronous and parallel processing
-* within the same process. The pool class provides a convenient way
-* for dispatching asynchronous tasks as functions objects. The scheduling
-* of these tasks can be easily controlled by using customized schedulers.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-
-#ifndef THREADPOOL_POOL_CORE_HPP_INCLUDED
-#define THREADPOOL_POOL_CORE_HPP_INCLUDED
-
-
-
-
-#include "locking_ptr.hpp"
-#include "worker_thread.hpp"
-
-#include "../task_adaptors.hpp"
-
-#include <boost/thread.hpp>
-#include <boost/thread/exceptions.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/condition.hpp>
-#include <boost/smart_ptr.hpp>
-#include <boost/bind.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits.hpp>
-
-#include <vector>
-
-
-/// The namespace threadpool contains a thread pool and related utility classes.
-namespace boost { namespace threadpool { namespace detail
-{
-
- /*! \brief Thread pool.
- *
- * Thread pools are a mechanism for asynchronous and parallel processing
- * within the same process. The pool class provides a convenient way
- * for dispatching asynchronous tasks as functions objects. The scheduling
- * of these tasks can be easily controlled by using customized schedulers.
- * A task must not throw an exception.
- *
- * A pool_impl is DefaultConstructible and NonCopyable.
- *
- * \param Task A function object which implements the operator 'void operator() (void) const'. The operator () is called by the pool to execute the task. Exceptions are ignored.
- * \param Scheduler A task container which determines how tasks are scheduled. It is guaranteed that this container is accessed only by one thread at a time. The scheduler shall not throw exceptions.
- *
- * \remarks The pool class is thread-safe.
- *
- * \see Tasks: task_func, prio_task_func
- * \see Scheduling policies: fifo_scheduler, lifo_scheduler, prio_scheduler
- */
- template <
- typename Task,
-
- template <typename> class SchedulingPolicy,
- template <typename> class SizePolicy,
- template <typename> class SizePolicyController,
- template <typename> class ShutdownPolicy
- >
- class pool_core
- : public enable_shared_from_this< pool_core<Task, SchedulingPolicy, SizePolicy, SizePolicyController, ShutdownPolicy > >
- , private noncopyable
- {
-
- public: // Type definitions
- typedef Task task_type; //!< Indicates the task's type.
- typedef SchedulingPolicy<task_type> scheduler_type; //!< Indicates the scheduler's type.
- typedef pool_core<Task,
- SchedulingPolicy,
- SizePolicy,
- SizePolicyController,
- ShutdownPolicy > pool_type; //!< Indicates the thread pool's type.
- typedef SizePolicy<pool_type> size_policy_type; //!< Indicates the sizer's type.
- //typedef typename size_policy_type::size_controller size_controller_type;
-
- typedef SizePolicyController<pool_type> size_controller_type;
-
-// typedef SizePolicy<pool_type>::size_controller size_controller_type;
- typedef ShutdownPolicy<pool_type> shutdown_policy_type;//!< Indicates the shutdown policy's type.
-
- typedef worker_thread<pool_type> worker_type;
-
- // The task is required to be a nullary function.
- BOOST_STATIC_ASSERT(function_traits<task_type()>::arity == 0);
-
- // The task function's result type is required to be void.
- BOOST_STATIC_ASSERT(is_void<typename result_of<task_type()>::type >::value);
-
-
- private: // Friends
- friend class worker_thread<pool_type>;
-
-#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x580) // Tested with CC: Sun C++ 5.8 Patch 121018-08 2006/12/06
- friend class SizePolicy;
- friend class ShutdownPolicy;
-#else
- friend class SizePolicy<pool_type>;
- friend class ShutdownPolicy<pool_type>;
-#endif
-
- private: // The following members may be accessed by _multiple_ threads at the same time:
- volatile size_t m_worker_count;
- volatile size_t m_target_worker_count;
- volatile size_t m_active_worker_count;
-
-
-
- private: // The following members are accessed only by _one_ thread at the same time:
- scheduler_type m_scheduler;
- scoped_ptr<size_policy_type> m_size_policy; // is never null
-
- bool m_terminate_all_workers; // Indicates if termination of all workers was triggered.
- std::vector<shared_ptr<worker_type> > m_terminated_workers; // List of workers which are terminated but not fully destructed.
-
- private: // The following members are implemented thread-safe:
- mutable recursive_mutex m_monitor;
- mutable condition m_worker_idle_or_terminated_event; // A worker is idle or was terminated.
- mutable condition m_task_or_terminate_workers_event; // Task is available OR total worker count should be reduced.
-
- public:
- /// Constructor.
- pool_core()
- : m_worker_count(0)
- , m_target_worker_count(0)
- , m_active_worker_count(0)
- , m_terminate_all_workers(false)
- {
- pool_type volatile & self_ref = *this;
- m_size_policy.reset(new size_policy_type(self_ref));
-
- m_scheduler.clear();
- }
-
-
- /// Destructor.
- ~pool_core()
- {
- }
-
- /*! Gets the size controller which manages the number of threads in the pool.
- * \return The size controller.
- * \see SizePolicy
- */
- size_controller_type size_controller()
- {
- return size_controller_type(*m_size_policy, this->shared_from_this());
- }
-
- /*! Gets the number of threads in the pool.
- * \return The number of threads.
- */
- size_t size() const volatile
- {
- return m_worker_count;
- }
-
-// TODO is only called once
- void shutdown()
- {
- ShutdownPolicy<pool_type>::shutdown(*this);
- }
-
- /*! Schedules a task for asynchronous execution. The task will be executed once only.
- * \param task The task function object. It should not throw execeptions.
- * \return true, if the task could be scheduled and false otherwise.
- */
- bool schedule(task_type const & task) volatile
- {
- locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
-
- if(lockedThis->m_scheduler.push(task))
- {
- lockedThis->m_task_or_terminate_workers_event.notify_one();
- return true;
- }
- else
- {
- return false;
- }
- }
-
-
- /*! Returns the number of tasks which are currently executed.
- * \return The number of active tasks.
- */
- size_t active() const volatile
- {
- return m_active_worker_count;
- }
-
-
- /*! Returns the number of tasks which are ready for execution.
- * \return The number of pending tasks.
- */
- size_t pending() const volatile
- {
- locking_ptr<const pool_type, recursive_mutex> lockedThis(*this, m_monitor);
- return lockedThis->m_scheduler.size();
- }
-
-
- /*! Removes all pending tasks from the pool's scheduler.
- */
- void clear() volatile
- {
- locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
- lockedThis->m_scheduler.clear();
- }
-
-
- /*! Indicates that there are no tasks pending.
- * \return true if there are no tasks ready for execution.
- * \remarks This function is more efficient that the check 'pending() == 0'.
- */
- bool empty() const volatile
- {
- locking_ptr<const pool_type, recursive_mutex> lockedThis(*this, m_monitor);
- return lockedThis->m_scheduler.empty();
- }
-
-
- /*! The current thread of execution is blocked until the sum of all active
- * and pending tasks is equal or less than a given threshold.
- * \param task_threshold The maximum number of tasks in pool and scheduler.
- */
- void wait(size_t const task_threshold = 0) const volatile
- {
- const pool_type* self = const_cast<const pool_type*>(this);
- recursive_mutex::scoped_lock lock(self->m_monitor);
-
- if(0 == task_threshold)
- {
- while(0 != self->m_active_worker_count || !self->m_scheduler.empty())
- {
- self->m_worker_idle_or_terminated_event.wait(lock);
- }
- }
- else
- {
- while(task_threshold < self->m_active_worker_count + self->m_scheduler.size())
- {
- self->m_worker_idle_or_terminated_event.wait(lock);
- }
- }
- }
-
- /*! The current thread of execution is blocked until the timestamp is met
- * or the sum of all active and pending tasks is equal or less
- * than a given threshold.
- * \param timestamp The time when function returns at the latest.
- * \param task_threshold The maximum number of tasks in pool and scheduler.
- * \return true if the task sum is equal or less than the threshold, false otherwise.
- */
- bool wait(xtime const & timestamp, size_t const task_threshold = 0) const volatile
- {
- const pool_type* self = const_cast<const pool_type*>(this);
- recursive_mutex::scoped_lock lock(self->m_monitor);
-
- if(0 == task_threshold)
- {
- while(0 != self->m_active_worker_count || !self->m_scheduler.empty())
- {
- if(!self->m_worker_idle_or_terminated_event.timed_wait(lock, timestamp)) return false;
- }
- }
- else
- {
- while(task_threshold < self->m_active_worker_count + self->m_scheduler.size())
- {
- if(!self->m_worker_idle_or_terminated_event.timed_wait(lock, timestamp)) return false;
- }
- }
-
- return true;
- }
-
-
- private:
-
-
- void terminate_all_workers(bool const wait) volatile
- {
- pool_type* self = const_cast<pool_type*>(this);
- recursive_mutex::scoped_lock lock(self->m_monitor);
-
- self->m_terminate_all_workers = true;
-
- m_target_worker_count = 0;
- self->m_task_or_terminate_workers_event.notify_all();
-
- if(wait)
- {
- while(m_active_worker_count > 0)
- {
- self->m_worker_idle_or_terminated_event.wait(lock);
- }
-
- for(typename std::vector<shared_ptr<worker_type> >::iterator it = self->m_terminated_workers.begin();
- it != self->m_terminated_workers.end();
- ++it)
- {
- (*it)->join();
- }
- self->m_terminated_workers.clear();
- }
- }
-
-
- /*! Changes the number of worker threads in the pool. The resizing
- * is handled by the SizePolicy.
- * \param threads The new number of worker threads.
- * \return true, if pool will be resized and false if not.
- */
- bool resize(size_t const worker_count) volatile
- {
- locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
-
- if(!m_terminate_all_workers)
- {
- m_target_worker_count = worker_count;
- }
- else
- {
- return false;
- }
-
-
- if(m_worker_count <= m_target_worker_count)
- { // increase worker count
- while(m_worker_count < m_target_worker_count)
- {
- try
- {
- worker_thread<pool_type>::create_and_attach(lockedThis->shared_from_this());
- m_worker_count++;
- m_active_worker_count++;
- }
- catch(thread_resource_error&)
- {
- return false;
- }
- }
- }
- else
- { // decrease worker count
- lockedThis->m_task_or_terminate_workers_event.notify_all(); // TODO: Optimize number of notified workers
- }
-
- return true;
- }
-
-
- // worker died with unhandled exception
- void worker_died_unexpectedly(shared_ptr<worker_type> worker) volatile
- {
- locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
-
- m_worker_count--;
- m_active_worker_count--;
- lockedThis->m_worker_idle_or_terminated_event.notify_all();
-
- if(m_terminate_all_workers)
- {
- lockedThis->m_terminated_workers.push_back(worker);
- }
- else
- {
- lockedThis->m_size_policy->worker_died_unexpectedly(m_worker_count);
- }
- }
-
- void worker_destructed(shared_ptr<worker_type> worker) volatile
- {
- locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
- m_worker_count--;
- m_active_worker_count--;
- lockedThis->m_worker_idle_or_terminated_event.notify_all();
-
- if(m_terminate_all_workers)
- {
- lockedThis->m_terminated_workers.push_back(worker);
- }
- }
-
-
- bool execute_task() volatile
- {
- function0<void> task;
-
- { // fetch task
- pool_type* lockedThis = const_cast<pool_type*>(this);
- recursive_mutex::scoped_lock lock(lockedThis->m_monitor);
-
- // decrease number of threads if necessary
- if(m_worker_count > m_target_worker_count)
- {
- return false; // terminate worker
- }
-
-
- // wait for tasks
- while(lockedThis->m_scheduler.empty())
- {
- // decrease number of workers if necessary
- if(m_worker_count > m_target_worker_count)
- {
- return false; // terminate worker
- }
- else
- {
- m_active_worker_count--;
- lockedThis->m_worker_idle_or_terminated_event.notify_all();
- lockedThis->m_task_or_terminate_workers_event.wait(lock);
- m_active_worker_count++;
- }
- }
-
- task = lockedThis->m_scheduler.top();
- lockedThis->m_scheduler.pop();
- }
-
- // call task function
- if(task)
- {
- task();
- }
-
- //guard->disable();
- return true;
- }
- };
-
-
-
-
-} } } // namespace boost::threadpool::detail
-
-#endif // THREADPOOL_POOL_CORE_HPP_INCLUDED
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/scope_guard.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/scope_guard.hpp
deleted file mode 100644
index 68634654ba..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/scope_guard.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/*! \file
-* \brief TODO.
-*
-* TODO.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-
-#ifndef THREADPOOL_DETAIL_SCOPE_GUARD_HPP_INCLUDED
-#define THREADPOOL_DETAIL_SCOPE_GUARD_HPP_INCLUDED
-
-
-
-#include <boost/function.hpp>
-
-
-namespace boost { namespace threadpool { namespace detail
-{
-
-// TODO documentation
-class scope_guard
-: private boost::noncopyable
-{
- function0<void> const m_function;
- bool m_is_active;
-
-public:
- scope_guard(function0<void> const & call_on_exit)
- : m_function(call_on_exit)
- , m_is_active(true)
- {
- }
-
- ~scope_guard()
- {
- if(m_is_active && m_function)
- {
- m_function();
- }
- }
-
- void disable()
- {
- m_is_active = false;
- }
-};
-
-
-
-
-
-
-} } } // namespace boost::threadpool::detail
-
-#endif // THREADPOOL_DETAIL_SCOPE_GUARD_HPP_INCLUDED
-
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/worker_thread.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/worker_thread.hpp
deleted file mode 100644
index d33467a527..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/detail/worker_thread.hpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/*! \file
-* \brief Thread pool worker.
-*
-* The worker thread instance is attached to a pool
-* and executes tasks of this pool.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-#ifndef THREADPOOL_DETAIL_WORKER_THREAD_HPP_INCLUDED
-#define THREADPOOL_DETAIL_WORKER_THREAD_HPP_INCLUDED
-
-
-#include "scope_guard.hpp"
-
-#include <boost/smart_ptr.hpp>
-#include <boost/thread.hpp>
-#include <boost/thread/exceptions.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/bind.hpp>
-
-
-namespace boost { namespace threadpool { namespace detail
-{
-
- /*! \brief Thread pool worker.
- *
- * A worker_thread represents a thread of execution. The worker is attached to a
- * thread pool and processes tasks of that pool. The lifetime of the worker and its
- * internal boost::thread is managed automatically.
- *
- * This class is a helper class and cannot be constructed or accessed directly.
- *
- * \see pool_core
- */
- template <typename Pool>
- class worker_thread
- : public enable_shared_from_this< worker_thread<Pool> >
- , private noncopyable
- {
- public:
- typedef Pool pool_type; //!< Indicates the pool's type.
-
- private:
- shared_ptr<pool_type> m_pool; //!< Pointer to the pool which created the worker.
- shared_ptr<boost::thread> m_thread; //!< Pointer to the thread which executes the run loop.
-
-
- /*! Constructs a new worker.
- * \param pool Pointer to it's parent pool.
- * \see function create_and_attach
- */
- worker_thread(shared_ptr<pool_type> const & pool)
- : m_pool(pool)
- {
- assert(pool);
- }
-
-
- /*! Notifies that an exception occurred in the run loop.
- */
- void died_unexpectedly()
- {
- m_pool->worker_died_unexpectedly(this->shared_from_this());
- }
-
-
- public:
- /*! Executes pool's tasks sequentially.
- */
- void run()
- {
- scope_guard notify_exception(bind(&worker_thread::died_unexpectedly, this));
-
- while(m_pool->execute_task()) {}
-
- notify_exception.disable();
- m_pool->worker_destructed(this->shared_from_this());
- }
-
-
- /*! Joins the worker's thread.
- */
- void join()
- {
- m_thread->join();
- }
-
-
- /*! Constructs a new worker thread and attaches it to the pool.
- * \param pool Pointer to the pool.
- */
- static void create_and_attach(shared_ptr<pool_type> const & pool)
- {
- shared_ptr<worker_thread> worker(new worker_thread(pool));
- if(worker)
- {
- worker->m_thread.reset(new boost::thread(bind(&worker_thread::run, worker)));
- }
- }
-
- };
-
-
-} } } // namespace boost::threadpool::detail
-
-#endif // THREADPOOL_DETAIL_WORKER_THREAD_HPP_INCLUDED
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/future.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/future.hpp
deleted file mode 100644
index f4a6e12244..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/future.hpp
+++ /dev/null
@@ -1,144 +0,0 @@
-/*! \file
-* \brief TODO.
-*
-* TODO.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-#ifndef THREADPOOL_FUTURE_HPP_INCLUDED
-#define THREADPOOL_FUTURE_HPP_INCLUDED
-
-
-
-#include "./detail/future.hpp"
-#include <boost/utility/enable_if.hpp>
-
-//#include "pool.hpp"
-//#include <boost/utility.hpp>
-
-//#include <boost/thread/mutex.hpp>
-
-
-namespace boost { namespace threadpool
-{
-
- /*! \brief Experimental. Do not use in production code. TODO.
- *
- * TODO Future
- *
- * \see TODO
- *
- */
-
-
-template<class Result>
-class future
-{
-private:
- shared_ptr<detail::future_impl<Result> > m_impl;
-
-public:
- typedef Result const & result_type; //!< Indicates the functor's result type.
- typedef Result future_result_type; //!< Indicates the future's result type.
-
-
-public:
-
- future()
- : m_impl(new detail::future_impl<future_result_type>()) // TODO remove this
- {
- }
-
- // only for internal usage
- future(shared_ptr<detail::future_impl<Result> > const & impl)
- : m_impl(impl)
- {
- }
-
- bool ready() const
- {
- return m_impl->ready();
- }
-
- void wait() const
- {
- m_impl->wait();
- }
-
- bool timed_wait(boost::xtime const & timestamp) const
- {
- return m_impl->timed_wait(timestamp);
- }
-
- result_type operator()() // throw( thread::cancelation_exception, ... )
- {
- return (*m_impl)();
- }
-
- result_type get() // throw( thread::cancelation_exception, ... )
- {
- return (*m_impl)();
- }
-
- bool cancel()
- {
- return m_impl->cancel();
- }
-
- bool is_cancelled() const
- {
- return m_impl->is_cancelled();
- }
-};
-
-
-
-
-
-template<class Pool, class Function>
-typename disable_if <
- is_void< typename result_of< Function() >::type >,
- future< typename result_of< Function() >::type >
->::type
-schedule(Pool& pool, const Function& task)
-{
- typedef typename result_of< Function() >::type future_result_type;
-
- // create future impl and future
- shared_ptr<detail::future_impl<future_result_type> > impl(new detail::future_impl<future_result_type>);
- future <future_result_type> res(impl);
-
- // schedule future impl
- pool.schedule(detail::future_impl_task_func<detail::future_impl, Function>(task, impl));
-
- // return future
- return res;
-
-/*
- TODO
- if(pool->schedule(bind(&Future::run, future)))
- {
- return future;
- }
- else
- {
- // construct empty future
- return error_future;
- }
- */
-}
-
-
-
-} } // namespace boost::threadpool
-
-#endif // THREADPOOL_FUTURE_HPP_INCLUDED
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/pool.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/pool.hpp
deleted file mode 100644
index a4b6676ea9..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/pool.hpp
+++ /dev/null
@@ -1,232 +0,0 @@
-/*! \file
-* \brief Thread pool core.
-*
-* This file contains the threadpool's core class: pool<Task, SchedulingPolicy>.
-*
-* Thread pools are a mechanism for asynchronous and parallel processing
-* within the same process. The pool class provides a convenient way
-* for dispatching asynchronous tasks as functions objects. The scheduling
-* of these tasks can be easily controlled by using customized schedulers.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-
-#ifndef THREADPOOL_POOL_HPP_INCLUDED
-#define THREADPOOL_POOL_HPP_INCLUDED
-
-#include <boost/ref.hpp>
-
-#include "./detail/pool_core.hpp"
-
-#include "task_adaptors.hpp"
-
-#include "./detail/locking_ptr.hpp"
-
-#include "scheduling_policies.hpp"
-#include "size_policies.hpp"
-#include "shutdown_policies.hpp"
-
-
-
-/// The namespace threadpool contains a thread pool and related utility classes.
-namespace boost { namespace threadpool
-{
-
-
-
- /*! \brief Thread pool.
- *
- * Thread pools are a mechanism for asynchronous and parallel processing
- * within the same process. The pool class provides a convenient way
- * for dispatching asynchronous tasks as functions objects. The scheduling
- * of these tasks can be easily controlled by using customized schedulers.
- * A task must not throw an exception.
- *
- * A pool is DefaultConstructible, CopyConstructible and Assignable.
- * It has reference semantics; all copies of the same pool are equivalent and interchangeable.
- * All operations on a pool except assignment are strongly thread safe or sequentially consistent;
- * that is, the behavior of concurrent calls is as if the calls have been issued sequentially in an unspecified order.
- *
- * \param Task A function object which implements the operator 'void operator() (void) const'. The operator () is called by the pool to execute the task. Exceptions are ignored.
- * \param SchedulingPolicy A task container which determines how tasks are scheduled. It is guaranteed that this container is accessed only by one thread at a time. The scheduler shall not throw exceptions.
- *
- * \remarks The pool class is thread-safe.
- *
- * \see Tasks: task_func, prio_task_func
- * \see Scheduling policies: fifo_scheduler, lifo_scheduler, prio_scheduler
- */
- template <
- typename Task = task_func,
- template <typename> class SchedulingPolicy = fifo_scheduler,
- template <typename> class SizePolicy = static_size,
- template <typename> class SizePolicyController = resize_controller,
- template <typename> class ShutdownPolicy = wait_for_all_tasks
- >
- class thread_pool
- {
- typedef detail::pool_core<Task,
- SchedulingPolicy,
- SizePolicy,
- SizePolicyController,
- ShutdownPolicy> pool_core_type;
- shared_ptr<pool_core_type> m_core; // pimpl idiom
- shared_ptr<void> m_shutdown_controller; // If the last pool holding a pointer to the core is deleted the controller shuts the pool down.
-
- public: // Type definitions
- typedef Task task_type; //!< Indicates the task's type.
- typedef SchedulingPolicy<task_type> scheduler_type; //!< Indicates the scheduler's type.
- /* typedef thread_pool<Task,
- SchedulingPolicy,
- SizePolicy,
- ShutdownPolicy > pool_type; //!< Indicates the thread pool's type.
- */
- typedef SizePolicy<pool_core_type> size_policy_type;
- typedef SizePolicyController<pool_core_type> size_controller_type;
-
-
- public:
- /*! Constructor.
- * \param initial_threads The pool is immediately resized to set the specified number of threads. The pool's actual number threads depends on the SizePolicy.
- */
- thread_pool(size_t initial_threads = 0)
- : m_core(new pool_core_type)
- , m_shutdown_controller(static_cast<void*>(0), bind(&pool_core_type::shutdown, m_core))
- {
- size_policy_type::init(*m_core, initial_threads);
- }
-
-
- /*! Gets the size controller which manages the number of threads in the pool.
- * \return The size controller.
- * \see SizePolicy
- */
- size_controller_type size_controller()
- {
- return m_core->size_controller();
- }
-
-
- /*! Gets the number of threads in the pool.
- * \return The number of threads.
- */
- size_t size() const
- {
- return m_core->size();
- }
-
-
- /*! Schedules a task for asynchronous execution. The task will be executed once only.
- * \param task The task function object. It should not throw execeptions.
- * \return true, if the task could be scheduled and false otherwise.
- */
- bool schedule(task_type const & task)
- {
- return m_core->schedule(task);
- }
-
-
- /*! Returns the number of tasks which are currently executed.
- * \return The number of active tasks.
- */
- size_t active() const
- {
- return m_core->active();
- }
-
-
- /*! Returns the number of tasks which are ready for execution.
- * \return The number of pending tasks.
- */
- size_t pending() const
- {
- return m_core->pending();
- }
-
-
- /*! Removes all pending tasks from the pool's scheduler.
- */
- void clear()
- {
- m_core->clear();
- }
-
-
- /*! Indicates that there are no tasks pending.
- * \return true if there are no tasks ready for execution.
- * \remarks This function is more efficient that the check 'pending() == 0'.
- */
- bool empty() const
- {
- return m_core->empty();
- }
-
-
- /*! The current thread of execution is blocked until the sum of all active
- * and pending tasks is equal or less than a given threshold.
- * \param task_threshold The maximum number of tasks in pool and scheduler.
- */
- void wait(size_t task_threshold = 0) const
- {
- m_core->wait(task_threshold);
- }
-
-
- /*! The current thread of execution is blocked until the timestamp is met
- * or the sum of all active and pending tasks is equal or less
- * than a given threshold.
- * \param timestamp The time when function returns at the latest.
- * \param task_threshold The maximum number of tasks in pool and scheduler.
- * \return true if the task sum is equal or less than the threshold, false otherwise.
- */
- bool wait(xtime const & timestamp, size_t task_threshold = 0) const
- {
- return m_core->wait(timestamp, task_threshold);
- }
- };
-
-
-
- /*! \brief Fifo pool.
- *
- * The pool's tasks are fifo scheduled task_func functors.
- *
- */
- typedef thread_pool<task_func, fifo_scheduler, static_size, resize_controller, wait_for_all_tasks> fifo_pool;
-
-
- /*! \brief Lifo pool.
- *
- * The pool's tasks are lifo scheduled task_func functors.
- *
- */
- typedef thread_pool<task_func, lifo_scheduler, static_size, resize_controller, wait_for_all_tasks> lifo_pool;
-
-
- /*! \brief Pool for prioritized task.
- *
- * The pool's tasks are prioritized prio_task_func functors.
- *
- */
- typedef thread_pool<prio_task_func, prio_scheduler, static_size, resize_controller, wait_for_all_tasks> prio_pool;
-
-
- /*! \brief A standard pool.
- *
- * The pool's tasks are fifo scheduled task_func functors.
- *
- */
- typedef fifo_pool pool;
-
-
-
-} } // namespace boost::threadpool
-
-#endif // THREADPOOL_POOL_HPP_INCLUDED
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/pool_adaptors.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/pool_adaptors.hpp
deleted file mode 100644
index 6cde152d2a..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/pool_adaptors.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*! \file
-* \brief Pool adaptors.
-*
-* This file contains an easy-to-use adaptor similar to a smart
-* pointer for the pool class.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-
-#ifndef THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED
-#define THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED
-
-#include <boost/smart_ptr.hpp>
-
-
-namespace boost { namespace threadpool
-{
-
-
-// TODO convenience scheduling function
- /*! Schedules a Runnable for asynchronous execution. A Runnable is an arbitrary class with a run()
- * member function. This a convenience shorthand for pool->schedule(bind(&Runnable::run, task_object)).
- * \param
- * \param obj The Runnable object. The member function run() will be exectued and should not throw execeptions.
- * \return true, if the task could be scheduled and false otherwise.
- */
- template<typename Pool, typename Runnable>
- bool schedule(Pool& pool, shared_ptr<Runnable> const & obj)
- {
- return pool->schedule(bind(&Runnable::run, obj));
- }
-
- /*! Schedules a task for asynchronous execution. The task will be executed once only.
- * \param task The task function object.
- */
- template<typename Pool>
- typename enable_if <
- is_void< typename result_of< typename Pool::task_type() >::type >,
- bool
- >::type
- schedule(Pool& pool, typename Pool::task_type const & task)
- {
- return pool.schedule(task);
- }
-
-
- template<typename Pool>
- typename enable_if <
- is_void< typename result_of< typename Pool::task_type() >::type >,
- bool
- >::type
- schedule(shared_ptr<Pool> const pool, typename Pool::task_type const & task)
- {
- return pool->schedule(task);
- }
-
-
-} } // namespace boost::threadpool
-
-#endif // THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED
-
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/scheduling_policies.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/scheduling_policies.hpp
deleted file mode 100644
index 2d6c7c1bae..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/scheduling_policies.hpp
+++ /dev/null
@@ -1,262 +0,0 @@
-/*! \file
-* \brief Task scheduling policies.
-*
-* This file contains some fundamental scheduling policies for the pool class.
-* A scheduling policy is realized by a task container which controls the access to
-* the tasks. Fundamentally the container determines the order the tasks are processed
-* by the thread pool.
-* The task containers need not to be thread-safe because they are used by the pool
-* in thread-safe way.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-
-#ifndef THREADPOOL_SCHEDULING_POLICIES_HPP_INCLUDED
-#define THREADPOOL_SCHEDULING_POLICIES_HPP_INCLUDED
-
-
-#include <queue>
-#include <deque>
-
-#include "task_adaptors.hpp"
-
-namespace boost { namespace threadpool
-{
-
- /*! \brief SchedulingPolicy which implements FIFO ordering.
- *
- * This container implements a FIFO scheduling policy.
- * The first task to be added to the scheduler will be the first to be removed.
- * The processing proceeds sequentially in the same order.
- * FIFO stands for "first in, first out".
- *
- * \param Task A function object which implements the operator()(void).
- *
- */
- template <typename Task = task_func>
- class fifo_scheduler
- {
- public:
- typedef Task task_type; //!< Indicates the scheduler's task type.
-
- protected:
- std::deque<task_type> m_container; //!< Internal task container.
-
-
- public:
- /*! Adds a new task to the scheduler.
- * \param task The task object.
- * \return true, if the task could be scheduled and false otherwise.
- */
- bool push(task_type const & task)
- {
- m_container.push_back(task);
- return true;
- }
-
- /*! Removes the task which should be executed next.
- */
- void pop()
- {
- m_container.pop_front();
- }
-
- /*! Gets the task which should be executed next.
- * \return The task object to be executed.
- */
- task_type const & top() const
- {
- return m_container.front();
- }
-
- /*! Gets the current number of tasks in the scheduler.
- * \return The number of tasks.
- * \remarks Prefer empty() to size() == 0 to check if the scheduler is empty.
- */
- size_t size() const
- {
- return m_container.size();
- }
-
- /*! Checks if the scheduler is empty.
- * \return true if the scheduler contains no tasks, false otherwise.
- * \remarks Is more efficient than size() == 0.
- */
- bool empty() const
- {
- return m_container.empty();
- }
-
- /*! Removes all tasks from the scheduler.
- */
- void clear()
- {
- m_container.clear();
- }
- };
-
-
-
- /*! \brief SchedulingPolicy which implements LIFO ordering.
- *
- * This container implements a LIFO scheduling policy.
- * The last task to be added to the scheduler will be the first to be removed.
- * LIFO stands for "last in, first out".
- *
- * \param Task A function object which implements the operator()(void).
- *
- */
- template <typename Task = task_func>
- class lifo_scheduler
- {
- public:
- typedef Task task_type; //!< Indicates the scheduler's task type.
-
- protected:
- std::deque<task_type> m_container; //!< Internal task container.
-
- public:
- /*! Adds a new task to the scheduler.
- * \param task The task object.
- * \return true, if the task could be scheduled and false otherwise.
- */
- bool push(task_type const & task)
- {
- m_container.push_front(task);
- return true;
- }
-
- /*! Removes the task which should be executed next.
- */
- void pop()
- {
- m_container.pop_front();
- }
-
- /*! Gets the task which should be executed next.
- * \return The task object to be executed.
- */
- task_type const & top() const
- {
- return m_container.front();
- }
-
- /*! Gets the current number of tasks in the scheduler.
- * \return The number of tasks.
- * \remarks Prefer empty() to size() == 0 to check if the scheduler is empty.
- */
- size_t size() const
- {
- return m_container.size();
- }
-
- /*! Checks if the scheduler is empty.
- * \return true if the scheduler contains no tasks, false otherwise.
- * \remarks Is more efficient than size() == 0.
- */
- bool empty() const
- {
- return m_container.empty();
- }
-
- /*! Removes all tasks from the scheduler.
- */
- void clear()
- {
- m_container.clear();
- }
-
- };
-
-
-
- /*! \brief SchedulingPolicy which implements prioritized ordering.
- *
- * This container implements a scheduling policy based on task priorities.
- * The task with highest priority will be the first to be removed.
- * It must be possible to compare two tasks using operator<.
- *
- * \param Task A function object which implements the operator() and operator<. operator< must be a partial ordering.
- *
- * \see prio_thread_func
- *
- */
- template <typename Task = prio_task_func>
- class prio_scheduler
- {
- public:
- typedef Task task_type; //!< Indicates the scheduler's task type.
-
- protected:
- std::priority_queue<task_type> m_container; //!< Internal task container.
-
-
- public:
- /*! Adds a new task to the scheduler.
- * \param task The task object.
- * \return true, if the task could be scheduled and false otherwise.
- */
- bool push(task_type const & task)
- {
- m_container.push(task);
- return true;
- }
-
- /*! Removes the task which should be executed next.
- */
- void pop()
- {
- m_container.pop();
- }
-
- /*! Gets the task which should be executed next.
- * \return The task object to be executed.
- */
- task_type const & top() const
- {
- return m_container.top();
- }
-
- /*! Gets the current number of tasks in the scheduler.
- * \return The number of tasks.
- * \remarks Prefer empty() to size() == 0 to check if the scheduler is empty.
- */
- size_t size() const
- {
- return m_container.size();
- }
-
- /*! Checks if the scheduler is empty.
- * \return true if the scheduler contains no tasks, false otherwise.
- * \remarks Is more efficient than size() == 0.
- */
- bool empty() const
- {
- return m_container.empty();
- }
-
- /*! Removes all tasks from the scheduler.
- */
- void clear()
- {
- while(!m_container.empty())
- {
- m_container.pop();
- }
- }
- };
-
-
-} } // namespace boost::threadpool
-
-
-#endif // THREADPOOL_SCHEDULING_POLICIES_HPP_INCLUDED
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/shutdown_policies.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/shutdown_policies.hpp
deleted file mode 100644
index 047a6eb516..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/shutdown_policies.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/*! \file
-* \brief Shutdown policies.
-*
-* This file contains shutdown policies for thread_pool.
-* A shutdown policy controls the pool's behavior from the time
-* when the pool is not referenced any longer.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-
-#ifndef THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED
-#define THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED
-
-
-
-/// The namespace threadpool contains a thread pool and related utility classes.
-namespace boost { namespace threadpool
-{
-
-
-/*! \brief ShutdownPolicy which waits for the completion of all tasks
- * and the worker termination afterwards.
- *
- * \param Pool The pool's core type.
- */
- template<typename Pool>
- class wait_for_all_tasks
- {
- public:
- static void shutdown(Pool& pool)
- {
- pool.wait();
- pool.terminate_all_workers(true);
- }
- };
-
-
- /*! \brief ShutdownPolicy which waits for the completion of all active tasks
- * and the worker termination afterwards.
- *
- * \param Pool The pool's core type.
- */
- template<typename Pool>
- class wait_for_active_tasks
- {
- public:
- static void shutdown(Pool& pool)
- {
- pool.clear();
- pool.wait();
- pool.terminate_all_workers(true);
- }
- };
-
-
- /*! \brief ShutdownPolicy which does not wait for any tasks or worker termination.
- *
- * This policy does not wait for any tasks. Nevertheless all active tasks will be processed completely.
- *
- * \param Pool The pool's core type.
- */
- template<typename Pool>
- class immediately
- {
- public:
- static void shutdown(Pool& pool)
- {
- pool.clear();
- pool.terminate_all_workers(false);
- }
- };
-
-} } // namespace boost::threadpool
-
-#endif // THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/size_policies.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/size_policies.hpp
deleted file mode 100644
index e3c08038db..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/size_policies.hpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/*! \file
-* \brief Size policies.
-*
-* This file contains size policies for thread_pool. A size
-* policy controls the number of worker threads in the pool.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-
-#ifndef THREADPOOL_SIZE_POLICIES_HPP_INCLUDED
-#define THREADPOOL_SIZE_POLICIES_HPP_INCLUDED
-
-
-
-/// The namespace threadpool contains a thread pool and related utility classes.
-namespace boost { namespace threadpool
-{
-
- /*! \brief SizePolicyController which provides no functionality.
- *
- * \param Pool The pool's core type.
- */
- template<typename Pool>
- struct empty_controller
- {
- empty_controller(typename Pool::size_policy_type&, shared_ptr<Pool>) {}
- };
-
-
- /*! \brief SizePolicyController which allows resizing.
- *
- * \param Pool The pool's core type.
- */
- template< typename Pool >
- class resize_controller
- {
- typedef typename Pool::size_policy_type size_policy_type;
- reference_wrapper<size_policy_type> m_policy;
- shared_ptr<Pool> m_pool; //!< to make sure that the pool is alive (the policy pointer is valid) as long as the controller exists
-
- public:
- resize_controller(size_policy_type& policy, shared_ptr<Pool> pool)
- : m_policy(policy)
- , m_pool(pool)
- {
- }
-
- bool resize(size_t worker_count)
- {
- return m_policy.get().resize(worker_count);
- }
- };
-
-
- /*! \brief SizePolicy which preserves the thread count.
- *
- * \param Pool The pool's core type.
- */
- template<typename Pool>
- class static_size
- {
- reference_wrapper<Pool volatile> m_pool;
-
- public:
- static void init(Pool& pool, size_t const worker_count)
- {
- pool.resize(worker_count);
- }
-
- static_size(Pool volatile & pool)
- : m_pool(pool)
- {}
-
- bool resize(size_t const worker_count)
- {
- return m_pool.get().resize(worker_count);
- }
-
- void worker_died_unexpectedly(size_t const new_worker_count)
- {
- m_pool.get().resize(new_worker_count + 1);
- }
-
- // TODO this functions are not called yet
- void task_scheduled() {}
- void task_finished() {}
- };
-
-} } // namespace boost::threadpool
-
-#endif // THREADPOOL_SIZE_POLICIES_HPP_INCLUDED
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/task_adaptors.hpp b/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/task_adaptors.hpp
deleted file mode 100644
index 6b874e3358..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/boost/threadpool/task_adaptors.hpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/*! \file
-* \brief Task adaptors.
-*
-* This file contains adaptors for task function objects.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* Use, modification, and distribution are subject to 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-
-#ifndef THREADPOOL_TASK_ADAPTERS_HPP_INCLUDED
-#define THREADPOOL_TASK_ADAPTERS_HPP_INCLUDED
-
-
-#include <boost/smart_ptr.hpp>
-#include <boost/function.hpp>
-#include <boost/thread.hpp>
-
-
-namespace boost { namespace threadpool
-{
-
- /*! \brief Standard task function object.
- *
- * This function object wraps a nullary function which returns void.
- * The wrapped function is invoked by calling the operator ().
- *
- * \see boost function library
- *
- */
- typedef function0<void> task_func;
-
-
-
-
- /*! \brief Prioritized task function object.
- *
- * This function object wraps a task_func object and binds a priority to it.
- * prio_task_funcs can be compared using the operator < which realises a partial ordering.
- * The wrapped task function is invoked by calling the operator ().
- *
- * \see prio_scheduler
- *
- */
- class prio_task_func
- {
- private:
- unsigned int m_priority; //!< The priority of the task's function.
- task_func m_function; //!< The task's function.
-
- public:
- typedef void result_type; //!< Indicates the functor's result type.
-
- public:
- /*! Constructor.
- * \param priority The priority of the task.
- * \param function The task's function object.
- */
- prio_task_func(unsigned int const priority, task_func const & function)
- : m_priority(priority)
- , m_function(function)
- {
- }
-
- /*! Executes the task function.
- */
- void operator() (void) const
- {
- if(m_function)
- {
- m_function();
- }
- }
-
- /*! Comparison operator which realises a partial ordering based on priorities.
- * \param rhs The object to compare with.
- * \return true if the priority of *this is less than right hand side's priority, false otherwise.
- */
- bool operator< (const prio_task_func& rhs) const
- {
- return m_priority < rhs.m_priority;
- }
-
- }; // prio_task_func
-
-
-
-
-
-
-
-
- /*! \brief Looped task function object.
- *
- * This function object wraps a boolean thread function object.
- * The wrapped task function is invoked by calling the operator () and it is executed in regular
- * time intervals until false is returned. The interval length may be zero.
- * Please note that a pool's thread is engaged as long as the task is looped.
- *
- */
- class looped_task_func
- {
- private:
- function0<bool> m_function; //!< The task's function.
- unsigned int m_break_s; //!< Duration of breaks in seconds.
- unsigned int m_break_ns; //!< Duration of breaks in nano seconds.
-
- public:
- typedef void result_type; //!< Indicates the functor's result type.
-
- public:
- /*! Constructor.
- * \param function The task's function object which is looped until false is returned.
- * \param interval The minimum break time in milli seconds before the first execution of the task function and between the following ones.
- */
- looped_task_func(function0<bool> const & function, unsigned int const interval = 0)
- : m_function(function)
- {
- m_break_s = interval / 1000;
- m_break_ns = (interval - m_break_s * 1000) * 1000 * 1000;
- }
-
- /*! Executes the task function.
- */
- void operator() (void) const
- {
- if(m_function)
- {
- if(m_break_s > 0 || m_break_ns > 0)
- { // Sleep some time before first execution
- xtime xt;
- xtime_get(&xt, TIME_UTC);
- xt.nsec += m_break_ns;
- xt.sec += m_break_s;
- thread::sleep(xt);
- }
-
- while(m_function())
- {
- if(m_break_s > 0 || m_break_ns > 0)
- {
- xtime xt;
- xtime_get(&xt, TIME_UTC);
- xt.nsec += m_break_ns;
- xt.sec += m_break_s;
- thread::sleep(xt);
- }
- else
- {
- thread::yield(); // Be fair to other threads
- }
- }
- }
- }
-
- }; // looped_task_func
-
-
-} } // namespace boost::threadpool
-
-#endif // THREADPOOL_TASK_ADAPTERS_HPP_INCLUDED
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/Makefile b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/Makefile
deleted file mode 100644
index 578ff7e0ba..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-DOXYGEN=doxygen
-
-doc: clean copy_footer generate_doc
-
-copy_footer:
- cp footer/*.htm .
-
-copy_footer_sf:
- cp footer_sf/*.htm .
-
-generate_doc:
- $(DOXYGEN) overview.dox
- $(DOXYGEN) reference.dox
- $(DOXYGEN) tutorial.dox
- $(DOXYGEN) examples.dox
- $(DOXYGEN) design.dox
-
-clean:
- rm -rf ../../../doc
- rm -rf ../../../threadpool-$(RELEASE_VERSION)-doc
- rm -rf ../../../threadpool-$(RELEASE_VERSION)-doc.zip
-
-release_doc: clean doc
- cd ../../..; mv doc threadpool-$(RELEASE_VERSION)-doc
- cd ../../..; zip -r9 threadpool-$(RELEASE_VERSION)-doc.zip threadpool-$(RELEASE_VERSION)-doc
- cd ../../..; mv threadpool-$(RELEASE_VERSION)-doc doc
-
-doc_sf: clean copy_footer_sf generate_doc
-
-deploy_sf: doc_sf
- scp -vr ../../../doc/* $(RELEASE_MANAGER)@shell.sourceforge.net:/home/groups/t/th/threadpool/htdocs
-
-
-
-
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design.dox b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design.dox
deleted file mode 100644
index 06b287c7e4..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design.dox
+++ /dev/null
@@ -1,145 +0,0 @@
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "threadpool"
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = ../../../doc/design
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = NO
-BRIEF_MEMBER_DESC = NO
-REPEAT_BRIEF = NO
-ALWAYS_DETAILED_SEC = YES
-INLINE_INHERITED_MEMB = YES
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = /../../include/
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = YES
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = YES
-DETAILS_AT_TOP = YES
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 2
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = NO
-INLINE_INFO = NO
-SORT_MEMBER_DOCS = NO
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= NO
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = NO
-SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = design.txt
-FILE_PATTERNS =
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = YES
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION = NO
-VERBATIM_HEADERS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 1
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = .
-HTML_FILE_EXTENSION = .html
-HTML_HEADER = design_header.htm
-HTML_FOOTER = common_footer.htm
-HTML_STYLESHEET = threadpool.css
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 1
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design.txt b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design.txt
deleted file mode 100644
index 05cf85e8ac..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*! \page intro TODO5
-
-
-A thread pool manages a homogeneous pool of worker threads. In general worker threads are created once and are used to
-process a sequence of tasks. The re-use of threads reduces the thread creation and teardown overhead. The resource
-consumption is limited as the number of threads can be restricted. This leads to an improved system stability.
-
-Thread-per-task
-
-TODO5
-
-light-weight, no administration/management thread, synchronized scheduler, e.g. queue
-
-
- */
-
-
-/*! \page pattern Thread Pool Pattern
-
-
-In the thread pool pattern in programming, a number of N threads are created to perform a number of M tasks, usually organized in a queue. Typically, N << M. As soon as a thread completes its task, it will request the next task from the queue until all tasks have been completed. The thread can then terminate, or sleep until there are new tasks available.
-
-The number of threads used (N) is a parameter that can be tuned to provide the best performance.
-
-The advantage of using a Thread Pool over creating a new thread for each task, is that thread creation and destruction overhead is negated, which may result in better performance and better system stability.
-
-<BR>
-<B>From <A HREF="http://en.wikipedia.org/wiki/Thread_pool_pattern"> Wikipedia </A>, the free encyclopedia.</B>
-
-
-
- */
-
-
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design_header.htm b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design_header.htm
deleted file mode 100644
index 006ce09490..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/design_header.htm
+++ /dev/null
@@ -1,38 +0,0 @@
-<HTML>
- <HEAD>
- <TITLE>threadpool Documentation</TITLE>
- <LINK HREF="threadpool.css" REL="stylesheet" TYPE="text/css">
- </HEAD>
- <BODY BGCOLOR="#FFFFFF">
-
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
-
- <TD ALIGN="LEFT">
- <B>$projectname</B>
- </TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="../index.html">Overview</A> |
- <A CLASS="qindex" HREF="../reference/annotated.html">Reference</A> |
- <A CLASS="qindex" HREF="../tutorial/intro.html">Tutorial</A> |
- <A CLASS="qindex" HREF="../examples/intro.html">Examples</A> |
- <A CLASS="qindex" HREF="../design/intro.html">Design</A>
- </TD>
-
- </TR>
- </TABLE>
- </DIV>
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD ALIGN="LEFT">
- <B>Design</B>
- </TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="intro.html">TODO5</A> |
- <A CLASS="qindex" HREF="pattern.html">Thread Pool Pattern</A>
- </TD>
- </TR>
- </TABLE>
- </DIV>
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples.dox b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples.dox
deleted file mode 100644
index 128a4089ad..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples.dox
+++ /dev/null
@@ -1,145 +0,0 @@
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "threadpool"
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = ../../../doc/examples
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = NO
-BRIEF_MEMBER_DESC = NO
-REPEAT_BRIEF = NO
-ALWAYS_DETAILED_SEC = YES
-INLINE_INHERITED_MEMB = YES
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = /../../include
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = YES
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = YES
-DETAILS_AT_TOP = YES
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 2
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = NO
-INLINE_INFO = NO
-SORT_MEMBER_DOCS = NO
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= NO
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = NO
-SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = examples.txt
-FILE_PATTERNS =
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = YES
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION = NO
-VERBATIM_HEADERS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 1
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = .
-HTML_FILE_EXTENSION = .html
-HTML_HEADER = examples_header.htm
-HTML_FOOTER = common_footer.htm
-HTML_STYLESHEET = threadpool.css
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 1
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples.txt b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples.txt
deleted file mode 100644
index fbb29f4d33..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-
-/*! \page intro TODO3
-
-See src/examples/mergesort/mergesort.cpp
-<BR>
-
- */
-
-
-/*! \page pattern TODO4
-TODO4
-
- */
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples_header.htm b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples_header.htm
deleted file mode 100644
index d35512cf52..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/examples_header.htm
+++ /dev/null
@@ -1,38 +0,0 @@
-<HTML>
- <HEAD>
- <TITLE>threadpool Documentation</TITLE>
- <LINK HREF="threadpool.css" REL="stylesheet" TYPE="text/css">
- </HEAD>
- <BODY BGCOLOR="#FFFFFF">
-
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
-
- <TD ALIGN="LEFT">
- <B>$projectname</B>
- </TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="../index.html">Overview</A> |
- <A CLASS="qindex" HREF="../reference/annotated.html">Reference</A> |
- <A CLASS="qindex" HREF="../tutorial/intro.html">Tutorial</A> |
- <A CLASS="qindex" HREF="../examples/intro.html">Examples</A> |
- <A CLASS="qindex" HREF="../design/intro.html">Design</A>
- </TD>
-
- </TR>
- </TABLE>
- </DIV>
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD ALIGN="LEFT">
- <B>Examples</B>
- </TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="intro.html">TODO3</A> |
- <A CLASS="qindex" HREF="pattern.html">TODO4</A>
- </TD>
- </TR>
- </TABLE>
- </DIV>
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer/common_footer.htm b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer/common_footer.htm
deleted file mode 100644
index 1debd97adf..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer/common_footer.htm
+++ /dev/null
@@ -1,17 +0,0 @@
- <BR>
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD CLASS="tiny" ALIGN="LEFT">Copyright &copy 2005-2008 Philipp Henkel</TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="../index.html">Overview</A> |
- <A CLASS="qindex" HREF="../reference/annotated.html">Reference</A> |
- <A CLASS="qindex" HREF="../tutorial/intro.html">Tutorial</A> |
- <A CLASS="qindex" HREF="../examples/intro.html">Examples</A> |
- <A CLASS="qindex" HREF="../design/intro.html">Design</A>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- </BODY>
-</HTML>
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer/overview_footer.htm b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer/overview_footer.htm
deleted file mode 100644
index 75ef22b181..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer/overview_footer.htm
+++ /dev/null
@@ -1,17 +0,0 @@
- <BR>
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD CLASS="tiny" ALIGN="LEFT">Copyright &copy 2005-2008 Philipp Henkel</TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="index.html">Overview</A> |
- <A CLASS="qindex" HREF="reference/annotated.html">Reference</A> |
- <A CLASS="qindex" HREF="tutorial/intro.html">Tutorial</A> |
- <A CLASS="qindex" HREF="examples/intro.html">Examples</A> |
- <A CLASS="qindex" HREF="design/intro.html">Design</A>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- </BODY>
-</HTML>
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer_sf/common_footer.htm b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer_sf/common_footer.htm
deleted file mode 100644
index 7c177c9f33..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer_sf/common_footer.htm
+++ /dev/null
@@ -1,30 +0,0 @@
- <BR>
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD CLASS="tiny" ALIGN="LEFT">Copyright &copy 2005-2008 Philipp Henkel</TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="../index.html">Overview</A> |
- <A CLASS="qindex" HREF="../reference/annotated.html">Reference</A> |
- <A CLASS="qindex" HREF="../tutorial/intro.html">Tutorial</A> |
- <A CLASS="qindex" HREF="../examples/intro.html">Examples</A> |
- <A CLASS="qindex" HREF="../design/intro.html">Design</A>
- </TD>
- </TR>
- </TABLE>
- </DIV>
-
- <P align="right" valign="top">
- Hosted by
- <A HREF="http://sourceforge.net">
- <IMG src="http://sflogo.sourceforge.net/sflogo.php?group_id=158064&type=2"
- width="125"
- height="37"
- border="0"
- align="top"
- alt="SourceForge.net Logo"/>
- </A>
- </P>
-
- </BODY>
-</HTML>
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer_sf/overview_footer.htm b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer_sf/overview_footer.htm
deleted file mode 100644
index 4a6f80c53b..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/footer_sf/overview_footer.htm
+++ /dev/null
@@ -1,29 +0,0 @@
- <BR>
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD CLASS="tiny" ALIGN="LEFT">Copyright &copy 2005-2008 Philipp Henkel</TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="index.html">Overview</A> |
- <A CLASS="qindex" HREF="reference/annotated.html">Reference</A> |
- <A CLASS="qindex" HREF="tutorial/intro.html">Tutorial</A> |
- <A CLASS="qindex" HREF="examples/intro.html">Examples</A> |
- <A CLASS="qindex" HREF="design/intro.html">Design</A>
- </TD>
- </TR>
- </TABLE>
- </DIV>
-
- <P align="right" valign="top">
- Hosted by
- <A HREF="http://sourceforge.net">
- <IMG src="http://sflogo.sourceforge.net/sflogo.php?group_id=158064&type=2"
- width="125"
- height="37"
- border="0"
- align="top"
- alt="SourceForge.net Logo"/>
- </A>
- </P>
- </BODY>
-</HTML>
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/index.html b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/index.html
deleted file mode 100644
index f36e87310d..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/index.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<HTML>
- <HEAD>
- <TITLE>threadpool Documentation</TITLE>
- <meta http-equiv="refresh" content="2;url=overview/index.html">
- </HEAD>
- <BODY BGCOLOR="#FFFFFF">
-
- </BODY>
-</HTML>
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview.dox b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview.dox
deleted file mode 100644
index 3021c3972d..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview.dox
+++ /dev/null
@@ -1,145 +0,0 @@
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "threadpool"
-PROJECT_NUMBER = 0.2.5
-OUTPUT_DIRECTORY = ../../../doc
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = NO
-BRIEF_MEMBER_DESC = NO
-REPEAT_BRIEF = NO
-ALWAYS_DETAILED_SEC = YES
-INLINE_INHERITED_MEMB = YES
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = /../../../boost/threadpool
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = YES
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = YES
-DETAILS_AT_TOP = YES
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 2
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = NO
-INLINE_INFO = NO
-SORT_MEMBER_DOCS = NO
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= NO
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = NO
-SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = overview.txt
-FILE_PATTERNS =
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH = ../../..
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = YES
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION = NO
-VERBATIM_HEADERS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 1
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = .
-HTML_FILE_EXTENSION = .html
-HTML_HEADER = overview_header.htm
-HTML_FOOTER = overview_footer.htm
-HTML_STYLESHEET = threadpool.css
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 1
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview.txt b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview.txt
deleted file mode 100644
index 3a995fffb9..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview.txt
+++ /dev/null
@@ -1,205 +0,0 @@
-/*! \mainpage threadpool
-
-
-\section intro_sec threadpool
-threadpool is a cross-platform C++ thread pool library. In general terms thread pools
-are an efficient mechanism for asynchronous task processing within the same process.
-They realise the <A HREF="design/pattern.html"> thread pool pattern</A>.
-
-A thread pool manages a group of threads in order to process a large number of tasks.
-Since multiple threads can be executed in parallel this approach may be very efficient regarding the overall program performance on many computer systems. By restricting the number of threads and by reusing them resources are saved
-and additionally the system stability is increased.
-
-The threadpool library provides a convenient way for dispatching asynchronous tasks. Pools can be customized, managed dynamically and easily integrated into your software.
-
-
-\section dev_status_sec Development Status & Future Work
-The threadpool core classes are completed and the implemenation can be considered ready for production code. The library is used by several commercial server applications and can handle high workload without problems. I'm currently working on helper and service classes which make the
-usage of the pool more comfortable. A small tutorial introduces the thread pool and
-more example code will be added in the future. The documentation is far away from being finished.
-<BR>
-<BR><A HREF="http://threadpool.cvs.sourceforge.net/threadpool/threadpool">Browse CVS Repository</A>
-<BR>
-
-<P>
-Features
-- Policy-based thread pool implementation<BR>
-- Scheduling policies: fifo, lifo and priority<BR>
-- Size policies: static_size<BR>
-- Size policy controller: empty_controller, resize_controller<BR>
-- Shutdown policies: wait_for_all_tasks, wait_for_active_tasks, immediately<BR>
-- Smooth integration into STL and boost<BR>
-</P>
-
-<P>
-Future Work
-- More policies: deadline_scheduler, ...<BR>
-- Possibility of limiting the number of pending tasks<BR>
-- Futures (handles to results of scheduled functions)<BR>
-- More examples to illustrate the usage of the library<BR>
-- Provide Unit tests<BR>
-</P>
-
-
-
-
-\section down_sec Download Section
-<P>
-threadpool 0.2.5 (Development Snapshot)
-- <A HREF="http://prdownloads.sourceforge.net/threadpool/threadpool-0_2_5-src.zip?download">threadpool-0_2_5-src.zip</A><BR>
-- <A HREF="http://prdownloads.sourceforge.net/threadpool/threadpool-0_2_5-doc.zip?download">threadpool-0_2_5-doc.zip</A><BR>
-</P>
-
-For more information on the revisions see \ref changelog.
-
-
-\section platforms_sec Supported Platforms
-threadpool is highly portable. It runs on any platform on which Boost threads are available: Linux, Windows, Mac OS 9/X, Solaris, etc.
-
-
-\section boost_sec Boost Libraries
-Boost is a collection of high-quality C++ libraries and works on almost any
-modern operating system, including UNIX and Windows variants.
-In fact threadpool is only a small extension to the portable Boost source libraries.
-It incorporates the thread pool concept by using the thread library from William Kempf.
-For more information on this excellent library visit <A HREF="http://www.boost.org">Boost.org</A>.
-
-
-\section installation_sec Installing & Using threadpool
-threadpool consists only of header files, and so there is no need to build the library itself
-before using it in your own applications. You simply need to add the
-following directories to your compiler include path:<BR>
- - threadpool's include directory<BR>
- - the boost directory (e.g. the one called boost_1_37_0)<BR>
-
-Furthermore you have to compile boost's thread library and link against it (libboost_thread-*.lib under Windows).
-
-
-
-\section license_sec Software License
-threadpool is released under the \ref license "Boost Software License".
-This license encourages both commercial and non-commercial use.
-
-
-\section acknowledgments_sec Acknowledgments
-This library was written by Philipp Henkel.
-<P>
-I appreciate your suggestions, and would love to know if you
-use threadpool. Hopefully you will enjoy it and find it useful.
-Please post questions, comments, bugs, or contact me at:
-
-</P>
-
-threadpool@googlemail.com<BR>
-or<BR>
-<A HREF="http://www.sourceforge.net/projects/threadpool">www.sourceforge.net/projects/threadpool</A>
-<BR>
-<BR>
-*/
-
-
-
-/*! \page license Software License
-
-\verbinclude LICENSE_1_0.txt
-
-*/
-
-
-
- /*! \page changelog Change Log
-
- <B>0.2.5 (Stable)</B>
- - Made threadpool compatible to boost::thread 1.37
- - Fixed hang problem in shutdown method (Thanks to Sohail Somani)
- - Adapted repository layout to boost (Thanks to Alex Ott)
-
-<B>0.2.4 (Stable)</B>
- - Made threadpool compatible to boost::thread 1.35.x code base
- - Fixed compiler warning in scope_guard.hpp
-
-<B>0.2.4 (Stable)</B>
- - Made threadpool compatible to boost::thread 1.35.x code base
- - Fixed compiler warning in scope_guard.hpp
-
-<B>0.2.3 (Development)</B>
- - Implemented workaround for Sun C++ Pro compiler bug in pool_core
- - Removed subtask implementation (there was no demand for this feature)
- - Improved shutdown policies
-
-<B>0.2.2 (Development)</B>
- - Refactored SizePolicy and added SizePolicyController
- - Moved policies into separate files
- - Fixed some compiler problems (GCC)
- - Implemented size_controller handling
- - Implemented two size policies: static_size and fixed_size
- - Refactored worker_thread handling, moved policies from pool_core to pool
- - Specialized schedule function for usage with futures
- - Added compile test project
- - Improved constness in pool core class
- - Fixed timed wait
- - Implemented futures (in progress)
- - Added result_type to all functors
-
-<B>0.2.1 (Development)</B>
- - Pool base class (thread_pool) has now reference semantics.
- - Large refactorings: Removed scoped_pool, reimplemented worker (now worker_thread)
- - Fixed odd resize behaviour. Now resize changes the number of threads immediately.
- - Apply pimpl idiom on pool core class (to make the ugly scoped_pool class needless)
- - Introduced scheduling policies
- - Switched to policy-based design (PBD), inspired by Scott Meyers C++ workshop
- - Cosmetic code change: Replaced keyword 'class' with 'typename' in template definitions
- - Revised tutorials
- - New requirements: tasks functions should not and schedulers shall not throw exceptions
-
-<B>0.2.0 (Development)</B>
- - Moved threadpool into the boost namespace: boost::threadpool
- - Used keyword volatile to indicate thread-safe member functions
- - Used volatile on primitve types were appropriate
- - Moved worker to detail directory
- - Fixed thread deletion
- - Extended wait functionality (waiting for idle threads was implemented)
- - Renamed 'join()' to 'wait()' as 'join' indicates the termination of thread. That was not the case in pool::join.
- - Changed internal container of lifo and fifo schedulers to improve efficiency.
- - Improved code reference documentation (source code browser)
- - Renamed thread_func into task_func
- - Added += operator to scoped_pool to ease scheduling of tasks
- - Refactored file structures and class names
- - Added a new task concept (named subtask) which allows the combination of sequential and parallel execution
- - Added new task adaptor for looped or timed tasks: looped_task_func
- - Introduced function clear() which can be used to remove all tasks from the pool and schedulers
- - New function pool::active() which returns the number of active tasks
-
-<B>0.1.8 (Development)</B>
- - Fixed some compile errors which were reported by gcc
- - Wrote tutorial "Prioritized Tasks"
-
-<B>0.1.7 (Development)</B>
- - Added Visual Studio 2005 project files for tutorial and examples
-
-<B>0.1.6 (Development)</B>
- - Replaced task adaptor 'task' with boost::bind
- - Workers are unregistered from thread_group when they are terminated
- - Working on example boost::iostreams packet_filter
-
-<B>0.1.5 (Development)</B>
- - Finished threadpool reference
- - Class pool_adaptor was replaced by smart_pool
- - Minor pool improvements
- - First tutorial page online
-
-<B>0.1.4 (Development)</B>
- - Created the pool's homepage: http://threadpool.sourceforge.net
- - Improved documentation
- - Added build scripts
-
-<B>0.1.3 (Development)</B>
- - First public release
- - Added mergesort example
- - Added tutorial
- - Implementation of threadpool core and related classes
-
- */
-
-
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview_header.htm b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview_header.htm
deleted file mode 100644
index dc6e9f6c18..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/overview_header.htm
+++ /dev/null
@@ -1,36 +0,0 @@
-<HTML>
- <HEAD>
- <TITLE>threadpool Documentation</TITLE>
- <LINK HREF="threadpool.css" REL="stylesheet" TYPE="text/css">
- </HEAD>
- <BODY BGCOLOR="#FFFFFF">
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD ALIGN="LEFT">
- <B>$projectname</B>
- </TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="index.html">Overview</A> |
- <A CLASS="qindex" HREF="reference/annotated.html">Reference</A> |
- <A CLASS="qindex" HREF="tutorial/intro.html">Tutorial</A> |
- <A CLASS="qindex" HREF="examples/intro.html">Examples</A> |
- <A CLASS="qindex" HREF="design/intro.html">Design</A>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD ALIGN="LEFT">
- <B>Overview</B>
- </TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="index.html">Main Page</A> |
- <A CLASS="qindex" HREF="changelog.html">Change Log</A> |
- <A CLASS="qindex" HREF="license.html">Software License</A>
- </TD>
- </TR>
- </TABLE>
- </DIV>
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/reference.dox b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/reference.dox
deleted file mode 100644
index d0fb398834..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/reference.dox
+++ /dev/null
@@ -1,220 +0,0 @@
-# Doxyfile 1.4.2
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "threadpool"
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = ../../../doc/reference
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = NO
-BRIEF_MEMBER_DESC = NO
-REPEAT_BRIEF = YES
-ALWAYS_DETAILED_SEC = YES
-INLINE_INHERITED_MEMB = YES
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = /../../../boost/threadpool
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = YES
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = YES
-DETAILS_AT_TOP = YES
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 2
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = NO
-INLINE_INFO = NO
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = YES
-SORT_BY_SCOPE_NAME = YES
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= NO
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = NO
-SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../../../boost ../../../boost/threadpool
-FILE_PATTERNS = *.hpp
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH = /../examples
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = YES
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = YES
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION = NO
-VERBATIM_HEADERS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = YES
-COLS_IN_ALPHA_INDEX = 1
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = .
-HTML_FILE_EXTENSION = .html
-HTML_HEADER = reference_header.htm
-HTML_FOOTER = common_footer.htm
-HTML_STYLESHEET = threadpool.css
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 1
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT = rtf
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = YES
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = NO
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = YES
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = NO
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = NO
-INCLUDED_BY_GRAPH = NO
-CALL_GRAPH = NO
-GRAPHICAL_HIERARCHY = NO
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = NO
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/reference_header.htm b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/reference_header.htm
deleted file mode 100644
index 40fd7423aa..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/reference_header.htm
+++ /dev/null
@@ -1,40 +0,0 @@
-<HTML>
- <HEAD>
- <TITLE>threadpool Documentation</TITLE>
- <LINK HREF="threadpool.css" REL="stylesheet" TYPE="text/css">
- </HEAD>
- <BODY BGCOLOR="#FFFFFF">
-
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
-
- <TD ALIGN="LEFT">
- <B>$projectname</B>
- </TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="../index.html">Overview</A> |
- <A CLASS="qindex" HREF="../reference/annotated.html">Reference</A> |
- <A CLASS="qindex" HREF="../tutorial/intro.html">Tutorial</A> |
- <A CLASS="qindex" HREF="../examples/intro.html">Examples</A> |
- <A CLASS="qindex" HREF="../design/intro.html">Design</A>
- </TD>
-
- </TR>
- </TABLE>
- </DIV>
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD ALIGN="LEFT">
- <B>Reference</B>
- </TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="annotated.html">Class List</A> |
- <A CLASS="qindex" HREF="functions.html">Member Functions</A> |
- <A CLASS="qindex" HREF="namespacemembers.html">Typedefs</A> |
- <A CLASS="qindex" HREF="files.html">File List</A>
- </TD>
- </TR>
- </TABLE>
- </DIV>
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/threadpool.css b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/threadpool.css
deleted file mode 100644
index 8593700905..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/threadpool.css
+++ /dev/null
@@ -1,331 +0,0 @@
-BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
- font-family: Geneva, Arial, Helvetica, sans-serif;
-}
-BODY,TD {
- font-size: 90%;
-}
-H1 {
- text-align: center;
- font-size: 160%;
-}
-H2 {
- font-size: 120%;
-}
-H3 {
- font-size: 100%;
-}
-CAPTION { font-weight: bold }
-DIV.sidebar {
- width: 210px;
- background-color: #e8eef2;
- border: 1px solid #84b0c7;
- text-align: center;
- margin: 2px;
- margin-bottom: 20px;
- padding: 2px;
- line-height: 140%;
-}
-DIV.sidebar TABLE TR TD {
- font-size: 80%;
-}
-DIV.sidebar UL {
- margin-top: 10px;
- margin-bottom: 10px;
-}
-DIV.qindex {
- width: 100%;
- background-color: #e8eef2;
- border: 1px solid #84b0c7;
- text-align: center;
- margin: 2px;
- padding: 2px;
- line-height: 140%;
-}
-DIV.nav {
- width: 100%;
- background-color: #e8eef2;
- border: 1px solid #84b0c7;
- text-align: center;
- margin: 2px;
- padding: 2px;
- line-height: 140%;
-}
-DIV.navtab {
- background-color: #e8eef2;
- border: 1px solid #84b0c7;
- text-align: center;
- margin: 2px;
- margin-right: 15px;
- padding: 2px;
-}
-TD.navtab {
- font-size: 70%;
-}
-A.qindex {
- text-decoration: none;
- font-weight: bold;
- color: #1A419D;
-}
-A.qindex:visited {
- text-decoration: none;
- font-weight: bold;
- color: #1A419D
-}
-A.qindex:hover {
- text-decoration: none;
- background-color: #ddddff;
-}
-A.qindexHL {
- text-decoration: none;
- font-weight: bold;
- background-color: #6666cc;
- color: #ffffff;
- border: 1px double #9295C2;
-}
-A.qindexHL:hover {
- text-decoration: none;
- background-color: #6666cc;
- color: #ffffff;
-}
-A.anchor {
- text-decoration: none;
- color: #000000;
-}
-A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
-A.el { text-decoration: none; font-weight: bold }
-A.elRef { text-decoration: none; font-weight: bold }
-A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
-A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
-A.codeRef:link { text-decoration: none; font-weight: normal; color: #0000FF}
-A.codeRef:visited { text-decoration: none; font-weight: normal; color: #0000FF}
-A:hover { text-decoration: none; background-color: #f2f2ff }
-DL.el { margin-left: -1cm }
-.fragment {
- font-family: Fixed, monospace;
- font-size: 95%;
-}
-PRE.fragment {
- border: 1px solid #CCCCCC;
- background-color: #f5f5f5;
- margin-top: 4px;
- margin-bottom: 4px;
- margin-left: 2px;
- margin-right: 8px;
- padding-left: 6px;
- padding-right: 6px;
- padding-top: 4px;
- padding-bottom: 4px;
-}
-DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
-TD.md { background-color: #F4F4FB; font-weight: bold; }
-TD.mdPrefix {
- background-color: #F4F4FB;
- color: #606060;
- font-size: 80%;
-}
-TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
-TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
-DIV.groupHeader {
- margin-left: 16px;
- margin-top: 12px;
- margin-bottom: 6px;
- font-weight: bold;
-}
-DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
-BODY {
- background: white;
- color: black;
- margin-right: 20px;
- margin-left: 20px;
-}
-TD.indexkey {
- background-color: #e8eef2;
- font-weight: bold;
- padding-right : 10px;
- padding-top : 2px;
- padding-left : 10px;
- padding-bottom : 2px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 2px;
- margin-bottom : 2px;
- border: 1px solid #CCCCCC;
-}
-TD.indexvalue {
- background-color: #e8eef2;
- font-style: italic;
- padding-right : 10px;
- padding-top : 2px;
- padding-left : 10px;
- padding-bottom : 2px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 2px;
- margin-bottom : 2px;
- border: 1px solid #CCCCCC;
-}
-TR.memlist {
- background-color: #f0f0f0;
-}
-P.formulaDsp { text-align: center; }
-IMG.formulaDsp { }
-IMG.formulaInl { vertical-align: middle; }
-SPAN.keyword { color: #008000 }
-SPAN.keywordtype { color: #604020 }
-SPAN.keywordflow { color: #e08000 }
-SPAN.comment { color: #800000 }
-SPAN.preprocessor { color: #806020 }
-SPAN.stringliteral { color: #002080 }
-SPAN.charliteral { color: #008080 }
-.mdTable {
- border: 1px solid #868686;
- background-color: #F4F4FB;
-}
-.mdRow {
- padding: 8px 10px;
-}
-.mdescLeft {
- padding: 0px 8px 4px 8px;
- font-size: 80%;
- font-style: italic;
- background-color: #FAFAFA;
- border-top: 1px none #E0E0E0;
- border-right: 1px none #E0E0E0;
- border-bottom: 1px none #E0E0E0;
- border-left: 1px none #E0E0E0;
- margin: 0px;
-}
-.mdescRight {
- padding: 0px 8px 4px 8px;
- font-size: 80%;
- font-style: italic;
- background-color: #FAFAFA;
- border-top: 1px none #E0E0E0;
- border-right: 1px none #E0E0E0;
- border-bottom: 1px none #E0E0E0;
- border-left: 1px none #E0E0E0;
- margin: 0px;
-}
-.memItemLeft {
- padding: 1px 0px 0px 8px;
- margin: 4px;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-color: #E0E0E0;
- border-right-color: #E0E0E0;
- border-bottom-color: #E0E0E0;
- border-left-color: #E0E0E0;
- border-top-style: solid;
- border-right-style: none;
- border-bottom-style: none;
- border-left-style: none;
- background-color: #FAFAFA;
- font-size: 80%;
-}
-.memItemRight {
- padding: 1px 8px 0px 8px;
- margin: 4px;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-color: #E0E0E0;
- border-right-color: #E0E0E0;
- border-bottom-color: #E0E0E0;
- border-left-color: #E0E0E0;
- border-top-style: solid;
- border-right-style: none;
- border-bottom-style: none;
- border-left-style: none;
- background-color: #FAFAFA;
- font-size: 80%;
-}
-.memTemplItemLeft {
- padding: 1px 0px 0px 8px;
- margin: 4px;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-color: #E0E0E0;
- border-right-color: #E0E0E0;
- border-bottom-color: #E0E0E0;
- border-left-color: #E0E0E0;
- border-top-style: none;
- border-right-style: none;
- border-bottom-style: none;
- border-left-style: none;
- background-color: #FAFAFA;
- font-size: 80%;
-}
-.memTemplItemRight {
- padding: 1px 8px 0px 8px;
- margin: 4px;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-color: #E0E0E0;
- border-right-color: #E0E0E0;
- border-bottom-color: #E0E0E0;
- border-left-color: #E0E0E0;
- border-top-style: none;
- border-right-style: none;
- border-bottom-style: none;
- border-left-style: none;
- background-color: #FAFAFA;
- font-size: 80%;
-}
-.memTemplParams {
- padding: 1px 0px 0px 8px;
- margin: 4px;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-color: #E0E0E0;
- border-right-color: #E0E0E0;
- border-bottom-color: #E0E0E0;
- border-left-color: #E0E0E0;
- border-top-style: solid;
- border-right-style: none;
- border-bottom-style: none;
- border-left-style: none;
- color: #606060;
- background-color: #FAFAFA;
- font-size: 80%;
-}
-.search { color: #003399;
- font-weight: bold;
-}
-FORM.search {
- margin-bottom: 0px;
- margin-top: 0px;
-}
-INPUT.search { font-size: 75%;
- color: #000080;
- font-weight: normal;
- background-color: #e8eef2;
-}
-TD.tiny { font-size: 75%;
-}
-a {
- color: #1A41A8;
-}
-a:visited {
- color: #2A3798;
-}
-.dirtab { padding: 4px;
- border-collapse: collapse;
- border: 1px solid #84b0c7;
-}
-TH.dirtab { background: #e8eef2;
- font-weight: bold;
-}
-HR { height: 1px;
- border: none;
- border-top: 1px solid black;
-}
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial.dox b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial.dox
deleted file mode 100644
index 66a39edf23..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial.dox
+++ /dev/null
@@ -1,145 +0,0 @@
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "threadpool"
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = ../../../doc/tutorial
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = NO
-BRIEF_MEMBER_DESC = NO
-REPEAT_BRIEF = NO
-ALWAYS_DETAILED_SEC = YES
-INLINE_INHERITED_MEMB = YES
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = /../../include/
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = YES
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = YES
-DETAILS_AT_TOP = YES
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 2
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = NO
-INLINE_INFO = NO
-SORT_MEMBER_DOCS = NO
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= NO
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = NO
-SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = tutorial.txt
-FILE_PATTERNS =
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = YES
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION = NO
-VERBATIM_HEADERS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 1
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = .
-HTML_FILE_EXTENSION = .html
-HTML_HEADER = tutorial_header.htm
-HTML_FOOTER = common_footer.htm
-HTML_STYLESHEET = threadpool.css
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 1
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial.txt b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial.txt
deleted file mode 100644
index e89c96d9af..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial.txt
+++ /dev/null
@@ -1,207 +0,0 @@
-/*! \page intro Quick Start
-
-This tutorial introduces the threadpool library by discussing an easy to understand source listing:
-
-\code
-01
-02 #include "threadpool.hpp"
-03
-04 using namespace boost::threadpool;
-05
-06 // Some example tasks
-07 void first_task()
-08 {
-09 ...
-10 }
-11
-13 void second_task()
-14 {
-15 ...
-16 }
-17
-19 void third_task()
-20 {
-21 ...
-22 }
-23
-24 void execute_with_threadpool()
-25 {
-26 // Create a thread pool.
-27 pool tp(2);
-28
-29 // Add some tasks to the pool.
-30 tp.schedule(&first_task);
-31 tp.schedule(&second_task);
-32 tp.schedule(&third_task);
-33
-34 // Leave this function and wait until all tasks are finished.
-35 }
-36
-\endcode
-
-We start by including the necessary header files. The complete threadpool functionality can be used by simply including
-the "threadpool.hpp" header file at line 2.
-
-The three functions first_task(), second_task and third_task() are placeholders
-for tasks that should be executed by our pool.
-
-The thread pool is created at line 27. The argument indicates the number of initial threads.
-The new pool contains two threads that is two tasks can be processed in parallel. The pool's threads
-are sleeping until tasks are added.
-By default it uses a Fifo scheduling strategy.
-Fifo is an abbreviation of "first in, first out"
-and means in this case that the first task which is added is the
-first that will be executed. Generally this is the expected default behaviour
-since the tasks are executed in the order they are added to the pool.
-
-In line 30 to 32 the task functions are scheduled asynchronously using the pool's schedule function.
-A task is registered and it will be executed as soon as one of the pool's threads is idle.
-It is very important to understand that the task is only scheduled for execution.
-Schedule returns immediately and there are no guarantees about when the tasks are executed and how long
-the processing will take. As they are added to a fifo pool with two threads the following is true:
-- the execution of first_task begins first
-- second_task is started after first_task
-- third_task is begun at last
-- a maximum of two tasks may are processed in parallel
-- each scheduled task will be executed once only
-
-
-The pool reference tp is created in the scope of the function execute_with_threadpool(). When this
-function returns at line 35 tp goes out of scope and the pool will be destructed. As the default ShutdownPolicy
-is wait_for_all_tasks it is ensured that all tasks are processed before the pool is destroyed.
-
-\code
-101
-102 ...
-103 execute_with_threadpool(); // execute first_task, second_task and third_task
-104 // When this line is reached all tasks are finished and the pool is destructed.
-105
-\endcode
-
-The small code example clarifies the issue. When the function leaves the pool is shut down
-and waits for the tasks. That means the current thread of execution is blocked
-at the end of the execute_with_threadpool as long as
-the processing of tasks is in progress.
-
-<BR>
-*/
-
-
-/*! \page prioritized Prioritized Tasks
-
-TODO This tutorial is out dated.
-
-It's easy to prioritize asynchronous tasks by using the task adaptor prio_task_func.
-The following source listing illustrates how to setup the pool and add the tasks:
-
-\code
-01
-02 #include "threadpool.hpp"
-03
-04 using namespace boost::threadpool;
-05
-06 // Some example tasks
-07 void normal_task()
-08 {
-09 ...
-10 }
-11
-13 void important_task()
-14 {
-15 ...
-16 }
-17
-18 void execute_prioritized()
-19 {
-20 // Create prioritized thread pool container without any threads.
-21 scoped_pool<prio_pool, 0> tp;
-22
-23 // Add some tasks to the pool.
-24 tp += prio_task_func(5, &normal_task);
-25 tp += prio_task_func(100, &important_task);
-26 tp += prio_task_func(7, &normal_task);
-27
-28 // Add the some threads to the pool. This will start the execution of the tasks.
-29 tp->resize(2);
-30
-31 // The tasks are processed according to their priority: important_task(100), nonrelevant_task(7), nonrelevant_task(5).
-32
-33 tp->wait();
-34
-35 // Now all tasks are finished and the pool will be destroyed safely when tp goes out of scope.
-36 }
-37
-\endcode
-
-Like in the first tutorial we start including the main header file and defining some tasks.
-
-At line 21 a prioritized thread pool is created. That means that the pool's tasks are arranged
-according to their priority before they get executed. Therefore the tasks themselves have to realize a partial ordering based
-on operator<.
-
-The adaptor prio_thread_func satisfies our requirements regarding the order and is just a small wrapper object for
-the task functions. In line 24 to 26 some prioritized tasks are scheduled. This time the pool's schedule function is used and like smart pool's += operator
-this function returns immediately.
-
-At line 29 the first thread is added to the pool and the execution of important_task begins. As we have only one thread
-the tasks are processed sequentially.
-
-Finally wait() is called to ensure that all tasks are finished before our example function returns
-and the pool is destroyed. This is very important since the behavior is undefined if pool's lifetime ends while tasks are executed.
-
-*/
-
-
-/*! \page task_adaptor Arbitrary Task Functions
-
-TODO This tutorial is out dated.
-
-
-\section member_task Member Task Functions
-
-using namespace boost::threadpool;
-
-TODO <BR>
-boost::bind(member_function, shared_ptr)
-26 tp->schedule(boost::bind(task_with_parameter, 42));
-12 // Second example task
-13 void task_with_parameter(int value)
-14 {
-15 ...
-16 }
-
-\section member_task Functions With Arguments
-
-*/
-
-
-/*! \page instantiation Advanced Instantiation
-
-TODO This tutorial is out dated.
-
-TODO <BR>
-Pool instantiation
-\code
-
- boost::shared_ptr<fifo_pool> tp = fifo_pool::create_pool(5);
-
- print(" Add tasks ...\n");
- tp->schedule(&task_1);
- tp->schedule(&task_2);
- tp->schedule(&task_3);
-
- tp->schedule(looped_task_func(&looped_task, 1500));
-
- print(" Wait until all tasks are finished ...\n");
- tp->wait();
- print(" Tasks finished!\n");
-
-\endcode
-
-
-\code
- typedef threadpool::pool<boost::function0<void>, threadpool::fifo_scheduler<boost::function0<void> > > pool_type;
- boost::shared_ptr< pool_type > tp = pool_type::create_pool(5);
-\endcode
-
-*/ \ No newline at end of file
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial_header.htm b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial_header.htm
deleted file mode 100644
index b087ec0f9f..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/doc/tutorial_header.htm
+++ /dev/null
@@ -1,40 +0,0 @@
-<HTML>
- <HEAD>
- <TITLE>threadpool Documentation</TITLE>
- <LINK HREF="threadpool.css" REL="stylesheet" TYPE="text/css">
- </HEAD>
- <BODY BGCOLOR="#FFFFFF">
-
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
-
- <TD ALIGN="LEFT">
- <B>$projectname</B>
- </TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="../index.html">Overview</A> |
- <A CLASS="qindex" HREF="../reference/annotated.html">Reference</A> |
- <A CLASS="qindex" HREF="../tutorial/intro.html">Tutorial</A> |
- <A CLASS="qindex" HREF="../examples/intro.html">Examples</A> |
- <A CLASS="qindex" HREF="../design/intro.html">Design</A>
- </TD>
-
- </TR>
- </TABLE>
- </DIV>
- <DIV CLASS="qindex">
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD ALIGN="LEFT">
- <B>Tutorial</B>
- </TD>
- <TD ALIGN="RIGHT">
- <A CLASS="qindex" HREF="intro.html">Quick Start</A> |
- <A CLASS="qindex" HREF="prioritized.html">Prioritized Tasks</A> |
- <A CLASS="qindex" HREF="task_adaptor.html">Arbitrary Task Functions</A> |
- <A CLASS="qindex" HREF="instantiation.html">Advanced Pool Instantiation</A>
- </TD>
- </TR>
- </TABLE>
- </DIV>
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/example/mergesort/Jamfile.v2 b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/example/mergesort/Jamfile.v2
deleted file mode 100644
index 8ff7fe2dbb..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/example/mergesort/Jamfile.v2
+++ /dev/null
@@ -1,11 +0,0 @@
-
-project
- : requirements
- <include>../../../..
- <library>/boost/thread//boost_thread
- <define>BOOST_ALL_NO_LIB=1
- <threading>multi
- <link>static
- ;
-
-exe mergesort : mergesort.cpp ;
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/example/mergesort/mergesort.cpp b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/example/mergesort/mergesort.cpp
deleted file mode 100644
index 338153453b..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/example/mergesort/mergesort.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-/*! \file
- * \brief Mergesort example.
- *
- * This example shows how to use the threadpool library.
- *
- * Copyright (c) 2005-2006 Philipp Henkel
- *
- * 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)
- *
- * http://threadpool.sourceforge.net
- *
- */
-
-
-#include <boost/threadpool.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/smart_ptr.hpp>
-#include <iostream>
-#include <sstream>
-#include <algorithm>
-
-
-
-using namespace std;
-using namespace boost::threadpool;
-
-//
-// Helpers
-boost::mutex m_io_monitor;
-
-void print(string text)
-{
- boost::mutex::scoped_lock lock(m_io_monitor);
- cout << text;
-}
-
-template<class T>
-string to_string(const T& value)
-{
- ostringstream ost;
- ost << value;
- ost.flush();
- return ost.str();
-}
-
-unsigned long get_ms_diff(boost::xtime& start, boost::xtime& end)
-{
- boost::xtime::xtime_sec_t start_ms = start.sec * 1000 + start.nsec/1000000;
- boost::xtime::xtime_sec_t end_ms = end.sec * 1000 + end.nsec/1000000;
- return static_cast<unsigned long>(end_ms - start_ms);
-}
-
-class image
-{
-public:
- image() : m_content(0) {}
- image(int content) : m_content(content) {}
-
- image(const image& src)
- {
- m_content = src.m_content;
- }
-
- bool operator<(const image& l) const
- {
- { // simulate time needed for image comparision
- boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
- int duration = 1+(m_content % 4);
- xt.nsec += 250 * 1000 * duration;
- boost::thread::sleep(xt);
- print(".");
- }
- return m_content < l.m_content;
- }
-
-protected:
- int m_content; // represents image data in this example
-};
-
-
-template<class T>
-class merge_job
-{
-public:
- merge_job(boost::shared_array<T> data, unsigned int position, unsigned int length)
- : m_data(data)
- , m_position(position)
- , m_length(length)
- {
- print("merge job created : " + to_string(m_position) +", "+ to_string(m_length) +"\n");
- }
-
- void run()
- {
- print("merge job running : " + to_string(m_position) +", "+ to_string(m_length) +"\n");
-
- T* begin = m_data.get();
- std::advance(begin, m_position);
-
- T* mid = m_data.get();
- std::advance(mid, m_position + m_length/2);
-
- T* end = m_data.get();
- std::advance(end, m_position + m_length);
-
- std::inplace_merge(begin, mid, end);
-
- print("\nmerge job finished: " + to_string(m_position) +", "+ to_string(m_length) +"\n");
- }
-
-protected:
- boost::shared_array<T> m_data;
- unsigned int m_position;
- unsigned int m_length;
-};
-
-
-
-
-//
-// A demonstration of the thread_pool class
-int main (int argc, char * const argv[])
-{
- print("MAIN: construct thread pool\n");
-
-
-
- boost::xtime start;
- boost::xtime_get(&start, boost::TIME_UTC);
-
- int exponent = 7;
- int data_len = 1 << exponent; // = pow(2, exponent)
-
- print("MAIN: sort array with "+ to_string(data_len) + " elements.\n");
-
- boost::shared_array<image> data(new image[data_len]);
-
- // fill array with arbitrary values (not sorted ascendingly)
- for(int i = 0; i < data_len; i++)
- {
- data[i] = image((data_len - i - 1) % 23);
- }
-
-
- /***************************/
- /* Standard implementation */
- /***************************/
-
- pool tp;
- tp.size_controller().resize(5);
-
-// merge data array
- for(int step = 1; step <= exponent; step++)
- {
- print("\nMAIN: merge step "+ to_string(step)+"\n");
-
- // divide array into partitions
- int partition_size = 1 << step;
- for(int partition = 0; partition < data_len/partition_size; partition++)
- {
- // sort partition
- boost::shared_ptr<merge_job<image> > job(new merge_job<image>(data, partition*partition_size, partition_size));
- //tp->schedule(prio_task_func(5, boost::bind(&merge_job<image>::run, job)));
- schedule(tp, boost::bind(&merge_job<image>::run, job));
- // schedule(tp, job);
- }
- tp.wait(); // wait until all partitions are sorted
- }
-
- boost::xtime end;
- boost::xtime_get(&end, boost::TIME_UTC);
-
- print("\nMAIN: duration " + to_string(get_ms_diff(start, end)) + " ms \n");
-
- print("\nMAIN: check if array is sorted... \n");
-
- // check if array is sorted ascendingly
- bool ascending = true;
- for(int i = 0; i < data_len-1; i++)
- {
- if(data[i+1] < data[i])
- {
- ascending = false;
- }
- }
-
- if(ascending)
- {
- print("\nMAIN: array is sorted\n");
- }
- else
- {
- print("\nMAIN: array is NOT sorted!\n");
- }
-
- return 0;
-}
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/Jamfile.v2 b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/Jamfile.v2
deleted file mode 100644
index 85b2bcb0fd..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/Jamfile.v2
+++ /dev/null
@@ -1,11 +0,0 @@
-
-project
- : requirements
- <include>../../..
- <library>/boost/thread//boost_thread
- <define>BOOST_ALL_NO_LIB=1
- <threading>multi
- <link>static
- ;
-
-exe quickstart : quickstart.cpp ;
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/README b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/README
deleted file mode 100644
index 4f97ce51d7..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/README
+++ /dev/null
@@ -1,7 +0,0 @@
-Supposing the boost directory is in /usr/local/lib, it is also worth to mention that they need to
-set LD_LIBRARY_PATH as follows:
-export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):/usr/local/lib
-
-Please adapt threadpool.makefile to your system.
-
-Special thanks to Rudy Prabowo who contributed this example to help linux users.
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/quickstart.cpp b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/quickstart.cpp
deleted file mode 100644
index 858573a0a8..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/quickstart/quickstart.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*! \file
- * \brief Quick start example.
- *
- * This is a very simple example which can be used to configure the threadpool environment on your system.
- *
- * Copyright (c) 2005-2006 Philipp Henkel
- *
- * 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)
- *
- * http://threadpool.sourceforge.net
- *
- */
-
-#include <iostream>
-
-#include <boost/threadpool.hpp>
-
-using namespace std;
-using namespace boost::threadpool;
-
-// Some example tasks
-void first_task()
-{
- cout << "first task is running\n" ;
-}
-
-void second_task()
-{
- cout << "second task is running\n" ;
-}
-
-int main(int argc,char *argv[])
-{
- // Create fifo thread pool container with two threads.
- pool tp(2);
-
- // Add some tasks to the pool.
- tp.schedule(&first_task);
- tp.schedule(&second_task);
-
- // Wait until all tasks are finished.
- tp.wait();
-
- // Now all tasks are finished!
- return(0);
-}
-
-
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/test/compile_all/Jamfile.v2 b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/test/compile_all/Jamfile.v2
deleted file mode 100644
index e14c124a8d..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/test/compile_all/Jamfile.v2
+++ /dev/null
@@ -1,11 +0,0 @@
-
-project
- : requirements
- <include>../../../..
- <library>/boost/thread//boost_thread
- <define>BOOST_ALL_NO_LIB=1
- <threading>multi
- <link>static
- ;
-
-exe compile_all : compile_all.cpp ;
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/test/compile_all/compile_all.cpp b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/test/compile_all/compile_all.cpp
deleted file mode 100644
index 1c349d4406..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/test/compile_all/compile_all.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-/*! \file
-* \brief threadpool tutorial.
-*
-* This file contains a tutorial for the threadpool library.
-*
-* Copyright (c) 2005-2006 Philipp Henkel
-*
-* 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-
-
-
-#include <iostream>
-#include <sstream>
-#include <boost/thread/mutex.hpp>
-#include <boost/bind.hpp>
-
-#include <boost/threadpool.hpp>
-
-using namespace std;
-using namespace boost::threadpool;
-
-
-//
-// Helpers
-boost::mutex m_io_monitor;
-
-void print(string text)
-{
- boost::mutex::scoped_lock lock(m_io_monitor);
- cout << text;
-}
-
-template<typename T>
-string to_string(T const & value)
-{
- ostringstream ost;
- ost << value;
- ost.flush();
- return ost.str();
-}
-
-
-
-//
-// An example task functions
-void task_1()
-{
- print(" task_1()\n");
-}
-
-void task_2()
-{
- print(" task_2()\n");
-}
-
-void task_3()
-{
- print(" task_3()\n");
-}
-
-int task_4()
-{
- print(" task_4()\n");
- return 4;
-}
-
-void task_with_parameter(int value)
-{
- print(" task_with_parameter(" + to_string(value) + ")\n");
-}
-
-int loops = 0;
-bool looped_task()
-{
- print(" looped_task()\n");
- return ++loops < 5;
-}
-
-
-int task_int()
-{
- print(" task_int()\n");
- return 23;
-}
-
-
-void fifo_pool_test()
-{
- pool tp;
-
- tp.schedule(&task_1);
- tp.schedule(boost::bind(task_with_parameter, 4));
-
- if(!tp.empty())
- {
- tp.clear(); // remove all tasks -> no output in this test
- }
-
- size_t active_threads = tp.active();
- size_t pending_threads = tp.pending();
- size_t total_threads = tp.size();
-
- size_t dummy = active_threads + pending_threads + total_threads;
- dummy++;
-
- tp.size_controller().resize(5);
- tp.wait();
-}
-
-void lifo_pool_test()
-{
- lifo_pool tp;
- tp.size_controller().resize(0);
- schedule(tp, &task_1);
- tp.size_controller().resize(10);
- tp.wait();
-}
-
-void prio_pool_test()
-{
- prio_pool tp(2);
- schedule(tp, prio_task_func(1, &task_1));
- schedule(tp, prio_task_func(10,&task_2));
-}
-
-
-void future_test()
-{
- fifo_pool tp(5);
- future<int> fut = schedule(tp, &task_4);
- int res = fut();
-}
-
-
-int main (int , char * const [])
-{
- fifo_pool_test();
- lifo_pool_test();
- prio_pool_test();
- future_test();
- return 0;
-}
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/tutorial/Jamfile.v2 b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/tutorial/Jamfile.v2
deleted file mode 100644
index 5b9d02b459..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/tutorial/Jamfile.v2
+++ /dev/null
@@ -1,11 +0,0 @@
-
-project
- : requirements
- <include>../../..
- <library>/boost/thread//boost_thread
- <define>BOOST_ALL_NO_LIB=1
- <threading>multi
- <link>static
- ;
-
-exe tutorial : tutorial.cpp ;
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/tutorial/tutorial.cpp b/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/tutorial/tutorial.cpp
deleted file mode 100644
index 4cc688509e..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/libs/threadpool/tutorial/tutorial.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-/*! \file
-* \brief threadpool tutorial.
-*
-* This file contains a tutorial for the threadpool library.
-*
-* Copyright (c) 2005-2007 Philipp Henkel
-*
-* 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)
-*
-* http://threadpool.sourceforge.net
-*
-*/
-
-//#define _CRTDBG_MAP_ALLOC
-#include <stdlib.h>
-
-#include <iostream>
-#include <sstream>
-#include <boost/thread/mutex.hpp>
-#include <boost/bind.hpp>
-#include <boost/threadpool.hpp>
-
-using namespace std;
-using namespace boost::threadpool;
-
-//
-// Helpers
-boost::mutex m_io_monitor;
-
-void print(string text)
-{
- boost::mutex::scoped_lock lock(m_io_monitor);
- cout << text;
-}
-
-template<typename T>
-string to_string(T const & value)
-{
- ostringstream ost;
- ost << value;
- ost.flush();
- return ost.str();
-}
-
-
-
-//
-// An example task functions
-void task_1()
-{
- print(" task_1()\n");
- throw 5;
-}
-
-void task_2()
-{
- print(" task_2()\n");
- throw 5;
-}
-
-void task_3()
-{
- print(" task_3()\n");
-}
-
-void task_with_parameter(int value)
-{
- print(" task_with_parameter(" + to_string(value) + ")\n");
-}
-
-int loops = 0;
-bool looped_task()
-{
- print(" looped_task()\n");
- return ++loops < 5;
-}
-
-
-int task_int_23()
-{
- print(" task_int_23()\n");
- return 23;
-}
-
-int task_int_1()
-{
- print(" task_int_1()\n");
- return 1;
-}
-
-
-class CTest
-{
- pool m_pool;
-public:
- CTest()
- : m_pool(pool(1000))
- {
- }
-};
-
-
-//
-// A demonstration of the thread_pool class
-int main (int , char * const [])
-{
- print("\nWelcome to the threadpool tutorial!\n");
-
- print("\n**************************************\n");
- print("Section 1: Quick Start\n");
-
- //void func()
- {
- print(" Create a new thread pool\n");
- pool tp(2); // tp is handle to the pool
-
- // Add tasks
- tp.schedule(&task_1);
- tp.schedule(&task_2);
- tp.schedule(&task_3);
- tp.schedule(boost::bind(task_with_parameter, 4));
-
- // The pool handle tp is allocated on stack and will
- // be destructed if it gets out of scope. Before the
- // pool is destroyed it waits for its tasks.
- // That means the current thread of execution is
- // blocked at the end of the function
- // (until all tasks are processed).
- // while (&tp){int i = 3; ++i;}
- }
-
- { // Section Futures
- print("\n**************************************\n");
- print("Section 1: Futures\n");
-
- //typedef thread_pool<task_func, fifo_scheduler, static_size, empty_controller, wait_for_all_tasks> test_pool;
-
- pool tp;
-
-// tp.resize(0);
- tp.pending();
-// tp.clear();
- boost::xtime t;
- tp.wait(t);
- bool test = tp.empty();
- if(test)
- {
- test = false;
- }
-
- tp.size_controller().resize(2);
-
- //test_pool::size_controller_type controller = tp.size_controller();
-// controller.resize(5);
-
- schedule(tp, &task_int_1);
- future<int> res = schedule(tp, &task_int_23);
- future<int> res2 = schedule(tp, &task_int_1);
-
- res.wait();
- int value = res.get() + res2.get();
-
- res.cancel();
- res.is_cancelled();
-value ++;
-
-//thread_pool<boost::function0<int>, fifo_scheduler> test2332;
-
-//TODO runnable comile test
- }
-
-
-
- { // Section 2
- print("\n**************************************\n");
- print("Section 2: Controlling scheduling\n");
-
- // Create a lifo_pool: last task in, first task out
- lifo_pool tp(0);
-
- print(" Add tasks (using the pool's schedule function)\n");
- schedule(tp, &task_1);
- schedule(tp, &task_2);
- schedule(tp, &task_3);
-
- // tp.wait(); This would be a deadlock as there are no threads which process the tasks.
-
- print(" Add some threads ...\n");
- tp.size_controller().resize(5);
-
- print(" Wait until all tasks are finished ...\n");
- tp.wait();
- print(" Tasks finished!\n");
- }
-
-
-
- { // Section 3:
- print("\n**************************************\n");
- print("Section 3: Prioritized Tasks\n");
-
- prio_pool tp(0);
-
-
- print(" Add prioritized tasks ...\n");
- schedule(tp, prio_task_func(1, &task_1));
- schedule(tp, prio_task_func(10,&task_2));
- schedule(tp, prio_task_func(5,&task_3));
-
- // Tasks are ordered according to their priority: task_2, task_4, task_3, task_1
-
- print(" Thread added\n");
- tp.size_controller().resize(10);
-
- print(" Wait until all tasks are finished ...\n");
- tp.wait();
- print(" Tasks finished!\n");
- }
-
-
-/* */
- { // Section 5:
- print("\n**************************************\n");
- print("Section 5: Advanced thread pool instantiation\n");
- // Create the pool directly
-/*
-TODO
-boost::shared_ptr<fifo_pool> tp = fifo_pool::create_pool(5);
-
- print(" Add tasks ...\n");
- tp->schedule(&task_1);
- tp->schedule(&task_2);
- tp->schedule(&task_3);
- tp->schedule(looped_task_func(&looped_task, 1500));
-
- print(" Wait until all tasks are finished ...\n");
- tp->wait();
-*/
-
- print(" Tasks finished!\n");
-
- }
-
-
- print("\n**************************************\n");
- print("Tutorial finished!\n");
-
-
-
- { // Section Compile Tests
- print("\n**************************************\n");
- print("Section Compile Tests\n");
-
-
- fifo_pool tp;
- tp.size_controller().resize(0);
- tp.empty();
- }
-
- return 0;
-}
diff --git a/graphics/asymptote/LspCpp/third_party/threadpool/project-root.jam b/graphics/asymptote/LspCpp/third_party/threadpool/project-root.jam
deleted file mode 100644
index e94f7232e0..0000000000
--- a/graphics/asymptote/LspCpp/third_party/threadpool/project-root.jam
+++ /dev/null
@@ -1,2 +0,0 @@
-import os ;
-path-constant BOOST_ROOT : [ os.environ BOOST_ROOT ] ;
diff --git a/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/CMakeDirectoryInformation.cmake b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/CMakeDirectoryInformation.cmake
index 51cd33465d..5fd42212b9 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/CMakeDirectoryInformation.cmake
+++ b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/CMakeDirectoryInformation.cmake
@@ -2,8 +2,8 @@
# Generated by "Unix Makefiles" Generator, CMake Version 3.22
# Relative path conversion top directories.
-set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/usr/local/src/asymptote-2.82/LspCpp")
-set(CMAKE_RELATIVE_PATH_TOP_BINARY "/usr/local/src/asymptote-2.82/LspCpp")
+set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/usr/local/src/asymptote-2.83/LspCpp")
+set(CMAKE_RELATIVE_PATH_TOP_BINARY "/usr/local/src/asymptote-2.83/LspCpp")
# Force unix paths in dependencies.
set(CMAKE_FORCE_UNIX_PATHS 1)
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
index 68cd85974d..a1efc1ed07 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/build.make
+++ b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/build.make
@@ -56,10 +56,10 @@ RM = /usr/bin/cmake -E rm -f
EQUALS = =
# The top-level source directory on which CMake was run.
-CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.82/LspCpp
+CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.83/LspCpp
# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.82/LspCpp
+CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.83/LspCpp
# Utility rule file for doc.
@@ -70,8 +70,8 @@ include third_party/uri/CMakeFiles/doc.dir/compiler_depend.make
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.82/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Generating API documentation with Doxygen"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri && /bin/doxygen /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/Doxyfile
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/usr/local/src/asymptote-2.83/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Generating API documentation with Doxygen"
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri && /bin/doxygen /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/Doxyfile
doc: third_party/uri/CMakeFiles/doc
doc: third_party/uri/CMakeFiles/doc.dir/build.make
@@ -82,10 +82,10 @@ 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.82/LspCpp/third_party/uri && $(CMAKE_COMMAND) -P CMakeFiles/doc.dir/cmake_clean.cmake
+ cd /usr/local/src/asymptote-2.83/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.82/LspCpp && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /usr/local/src/asymptote-2.82/LspCpp /usr/local/src/asymptote-2.82/LspCpp/third_party/uri /usr/local/src/asymptote-2.82/LspCpp /usr/local/src/asymptote-2.82/LspCpp/third_party/uri /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/CMakeFiles/doc.dir/DependInfo.cmake --color=$(COLOR)
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /usr/local/src/asymptote-2.83/LspCpp /usr/local/src/asymptote-2.83/LspCpp/third_party/uri /usr/local/src/asymptote-2.83/LspCpp /usr/local/src/asymptote-2.83/LspCpp/third_party/uri /usr/local/src/asymptote-2.83/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/Doxyfile b/graphics/asymptote/LspCpp/third_party/uri/Doxyfile
index cd61995ea9..af17d12e94 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/Doxyfile
+++ b/graphics/asymptote/LspCpp/third_party/uri/Doxyfile
@@ -128,7 +128,7 @@ FULL_PATH_NAMES = YES
# 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.82/LspCpp/third_party/uri/include/
+STRIP_FROM_PATH = /usr/local/src/asymptote-2.83/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
@@ -626,7 +626,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include
+INPUT = /usr/local/src/asymptote-2.83/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
@@ -658,7 +658,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE = /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail
+EXCLUDE = /usr/local/src/asymptote-2.83/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
@@ -821,7 +821,7 @@ COLS_IN_ALPHA_INDEX = 5
# 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.82/LspCpp/third_party/uri/uri/src/
+IGNORE_PREFIX = /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/uri/src/
#---------------------------------------------------------------------------
# configuration options related to the HTML output
diff --git a/graphics/asymptote/LspCpp/third_party/uri/Makefile b/graphics/asymptote/LspCpp/third_party/uri/Makefile
index 86b0d21ac4..cfaff962f3 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/Makefile
+++ b/graphics/asymptote/LspCpp/third_party/uri/Makefile
@@ -60,10 +60,10 @@ RM = /usr/bin/cmake -E rm -f
EQUALS = =
# The top-level source directory on which CMake was run.
-CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.82/LspCpp
+CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.83/LspCpp
# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.82/LspCpp
+CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.83/LspCpp
#=============================================================================
# Targets provided globally by CMake.
@@ -135,14 +135,14 @@ install/strip/fast: preinstall/fast
# The main all target
all: cmake_check_build_system
- cd /usr/local/src/asymptote-2.82/LspCpp && $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.82/LspCpp/CMakeFiles /usr/local/src/asymptote-2.82/LspCpp/third_party/uri//CMakeFiles/progress.marks
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/all
- $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.82/LspCpp/CMakeFiles 0
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.83/LspCpp/CMakeFiles /usr/local/src/asymptote-2.83/LspCpp/third_party/uri//CMakeFiles/progress.marks
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/all
+ $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.83/LspCpp/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/clean
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/clean
.PHONY : clean
# The main clean target
@@ -151,22 +151,22 @@ clean/fast: clean
# Prepare targets for installation.
preinstall: all
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/preinstall
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/preinstall
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+ cd /usr/local/src/asymptote-2.83/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.82/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/CMakeFiles/doc.dir/rule
+ cd /usr/local/src/asymptote-2.83/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.
@@ -175,7 +175,7 @@ doc: third_party/uri/CMakeFiles/doc.dir/rule
# fast build rule for target.
doc/fast:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/CMakeFiles/doc.dir/build.make third_party/uri/CMakeFiles/doc.dir/build
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/CMakeFiles/doc.dir/build.make third_party/uri/CMakeFiles/doc.dir/build
.PHONY : doc/fast
# Help Target
@@ -202,6 +202,6 @@ help:
# 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.82/LspCpp && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+ cd /usr/local/src/asymptote-2.83/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/cmake_install.cmake b/graphics/asymptote/LspCpp/third_party/uri/cmake_install.cmake
index 22997663f4..b42eb0b716 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/cmake_install.cmake
+++ b/graphics/asymptote/LspCpp/third_party/uri/cmake_install.cmake
@@ -1,4 +1,4 @@
-# Install script for directory: /usr/local/src/asymptote-2.82/LspCpp/third_party/uri
+# Install script for directory: /usr/local/src/asymptote-2.83/LspCpp/third_party/uri
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
@@ -43,12 +43,12 @@ if(NOT DEFINED CMAKE_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.82/LspCpp/third_party/uri/include")
+ file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/." TYPE DIRECTORY FILES "/usr/local/src/asymptote-2.83/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.82/LspCpp/third_party/uri/src/cmake_install.cmake")
+ include("/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/cmake_install.cmake")
endif()
diff --git a/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/CMakeDirectoryInformation.cmake b/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/CMakeDirectoryInformation.cmake
index 51cd33465d..5fd42212b9 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/CMakeDirectoryInformation.cmake
+++ b/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/CMakeDirectoryInformation.cmake
@@ -2,8 +2,8 @@
# Generated by "Unix Makefiles" Generator, CMake Version 3.22
# Relative path conversion top directories.
-set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/usr/local/src/asymptote-2.82/LspCpp")
-set(CMAKE_RELATIVE_PATH_TOP_BINARY "/usr/local/src/asymptote-2.82/LspCpp")
+set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/usr/local/src/asymptote-2.83/LspCpp")
+set(CMAKE_RELATIVE_PATH_TOP_BINARY "/usr/local/src/asymptote-2.83/LspCpp")
# Force unix paths in dependencies.
set(CMAKE_FORCE_UNIX_PATHS 1)
diff --git a/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/DependInfo.cmake b/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/DependInfo.cmake
index 75668a664f..cd700d1822 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/DependInfo.cmake
+++ b/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/DependInfo.cmake
@@ -8,14 +8,14 @@ set(CMAKE_DEPENDS_LANGUAGES
# The set of dependency files which are needed:
set(CMAKE_DEPENDS_DEPENDENCY_FILES
- "/usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_advance_parts.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o.d"
- "/usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_normalize.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o.d"
- "/usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o.d"
- "/usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse_authority.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o.d"
- "/usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_resolve.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o.d"
- "/usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o.d"
- "/usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri_builder.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o.d"
- "/usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri_errors.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o.d"
+ "/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_advance_parts.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o.d"
+ "/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_normalize.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o.d"
+ "/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o.d"
+ "/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse_authority.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o.d"
+ "/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_resolve.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o.d"
+ "/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o.d"
+ "/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri_builder.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o.d"
+ "/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri_errors.cpp" "third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o" "gcc" "third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o.d"
)
# Targets to which this target links.
diff --git a/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/build.make b/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/build.make
index cf80107ca1..85a02f3be9 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/build.make
+++ b/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/build.make
@@ -56,10 +56,10 @@ RM = /usr/bin/cmake -E rm -f
EQUALS = =
# The top-level source directory on which CMake was run.
-CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.82/LspCpp
+CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.83/LspCpp
# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.82/LspCpp
+CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.83/LspCpp
# Include any dependencies generated for this target.
include third_party/uri/src/CMakeFiles/network-uri.dir/depend.make
@@ -75,114 +75,114 @@ include third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o: third_party/uri/src/uri.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.ts
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.82/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o -MF CMakeFiles/network-uri.dir/uri.cpp.o.d -o CMakeFiles/network-uri.dir/uri.cpp.o -c /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri.cpp
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.83/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o"
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o -MF CMakeFiles/network-uri.dir/uri.cpp.o.d -o CMakeFiles/network-uri.dir/uri.cpp.o -c /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/network-uri.dir/uri.cpp.i"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri.cpp > CMakeFiles/network-uri.dir/uri.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri.cpp > CMakeFiles/network-uri.dir/uri.cpp.i
third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/network-uri.dir/uri.cpp.s"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri.cpp -o CMakeFiles/network-uri.dir/uri.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri.cpp -o CMakeFiles/network-uri.dir/uri.cpp.s
third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o: third_party/uri/src/uri_builder.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.ts
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.82/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o -MF CMakeFiles/network-uri.dir/uri_builder.cpp.o.d -o CMakeFiles/network-uri.dir/uri_builder.cpp.o -c /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri_builder.cpp
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.83/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o"
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o -MF CMakeFiles/network-uri.dir/uri_builder.cpp.o.d -o CMakeFiles/network-uri.dir/uri_builder.cpp.o -c /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri_builder.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/network-uri.dir/uri_builder.cpp.i"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri_builder.cpp > CMakeFiles/network-uri.dir/uri_builder.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri_builder.cpp > CMakeFiles/network-uri.dir/uri_builder.cpp.i
third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/network-uri.dir/uri_builder.cpp.s"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri_builder.cpp -o CMakeFiles/network-uri.dir/uri_builder.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri_builder.cpp -o CMakeFiles/network-uri.dir/uri_builder.cpp.s
third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o: third_party/uri/src/uri_errors.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.ts
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.82/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o -MF CMakeFiles/network-uri.dir/uri_errors.cpp.o.d -o CMakeFiles/network-uri.dir/uri_errors.cpp.o -c /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri_errors.cpp
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.83/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o"
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o -MF CMakeFiles/network-uri.dir/uri_errors.cpp.o.d -o CMakeFiles/network-uri.dir/uri_errors.cpp.o -c /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri_errors.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/network-uri.dir/uri_errors.cpp.i"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri_errors.cpp > CMakeFiles/network-uri.dir/uri_errors.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri_errors.cpp > CMakeFiles/network-uri.dir/uri_errors.cpp.i
third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/network-uri.dir/uri_errors.cpp.s"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri_errors.cpp -o CMakeFiles/network-uri.dir/uri_errors.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri_errors.cpp -o CMakeFiles/network-uri.dir/uri_errors.cpp.s
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o: third_party/uri/src/detail/uri_parse.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.ts
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.82/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o -MF CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o.d -o CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o -c /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse.cpp
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.83/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o"
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o -MF CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o.d -o CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o -c /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/network-uri.dir/detail/uri_parse.cpp.i"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse.cpp > CMakeFiles/network-uri.dir/detail/uri_parse.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse.cpp > CMakeFiles/network-uri.dir/detail/uri_parse.cpp.i
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/network-uri.dir/detail/uri_parse.cpp.s"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse.cpp -o CMakeFiles/network-uri.dir/detail/uri_parse.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse.cpp -o CMakeFiles/network-uri.dir/detail/uri_parse.cpp.s
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o: third_party/uri/src/detail/uri_parse_authority.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.ts
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.82/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o -MF CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o.d -o CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o -c /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse_authority.cpp
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.83/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o"
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o -MF CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o.d -o CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o -c /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse_authority.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.i"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse_authority.cpp > CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse_authority.cpp > CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.i
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.s"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse_authority.cpp -o CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse_authority.cpp -o CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.s
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o: third_party/uri/src/detail/uri_advance_parts.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.ts
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.82/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o -MF CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o.d -o CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o -c /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_advance_parts.cpp
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.83/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o"
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o -MF CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o.d -o CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o -c /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_advance_parts.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.i"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_advance_parts.cpp > CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_advance_parts.cpp > CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.i
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.s"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_advance_parts.cpp -o CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_advance_parts.cpp -o CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.s
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o: third_party/uri/src/detail/uri_normalize.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.ts
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.82/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o -MF CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o.d -o CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o -c /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_normalize.cpp
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.83/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o"
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o -MF CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o.d -o CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o -c /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_normalize.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.i"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_normalize.cpp > CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_normalize.cpp > CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.i
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.s"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_normalize.cpp -o CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_normalize.cpp -o CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.s
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o: third_party/uri/src/detail/uri_resolve.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o: third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.ts
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.82/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o -MF CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o.d -o CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o -c /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_resolve.cpp
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.83/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Building CXX object third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o"
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o -MF CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o.d -o CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o -c /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_resolve.cpp
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.i"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_resolve.cpp > CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_resolve.cpp > CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.i
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.s"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_resolve.cpp -o CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_resolve.cpp -o CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.s
# Object files for target network-uri
network__uri_OBJECTS = \
@@ -208,19 +208,19 @@ third_party/uri/src/libnetwork-uri.a: third_party/uri/src/CMakeFiles/network-uri
third_party/uri/src/libnetwork-uri.a: third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o
third_party/uri/src/libnetwork-uri.a: third_party/uri/src/CMakeFiles/network-uri.dir/build.make
third_party/uri/src/libnetwork-uri.a: third_party/uri/src/CMakeFiles/network-uri.dir/link.txt
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/usr/local/src/asymptote-2.82/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Linking CXX static library libnetwork-uri.a"
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && $(CMAKE_COMMAND) -P CMakeFiles/network-uri.dir/cmake_clean_target.cmake
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/network-uri.dir/link.txt --verbose=$(VERBOSE)
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/usr/local/src/asymptote-2.83/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Linking CXX static library libnetwork-uri.a"
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && $(CMAKE_COMMAND) -P CMakeFiles/network-uri.dir/cmake_clean_target.cmake
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/network-uri.dir/link.txt --verbose=$(VERBOSE)
# Rule to build all files generated by this target.
third_party/uri/src/CMakeFiles/network-uri.dir/build: third_party/uri/src/libnetwork-uri.a
.PHONY : third_party/uri/src/CMakeFiles/network-uri.dir/build
third_party/uri/src/CMakeFiles/network-uri.dir/clean:
- cd /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src && $(CMAKE_COMMAND) -P CMakeFiles/network-uri.dir/cmake_clean.cmake
+ cd /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src && $(CMAKE_COMMAND) -P CMakeFiles/network-uri.dir/cmake_clean.cmake
.PHONY : third_party/uri/src/CMakeFiles/network-uri.dir/clean
third_party/uri/src/CMakeFiles/network-uri.dir/depend:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /usr/local/src/asymptote-2.82/LspCpp /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src /usr/local/src/asymptote-2.82/LspCpp /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/DependInfo.cmake --color=$(COLOR)
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /usr/local/src/asymptote-2.83/LspCpp /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src /usr/local/src/asymptote-2.83/LspCpp /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/DependInfo.cmake --color=$(COLOR)
.PHONY : third_party/uri/src/CMakeFiles/network-uri.dir/depend
diff --git a/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.internal b/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.internal
index c777aff35a..8056417232 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.internal
+++ b/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.internal
@@ -2,10 +2,10 @@
# Generated by "Unix Makefiles" Generator, CMake Version 3.22
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_advance_parts.cpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_advance_parts.cpp
/usr/include/stdc-predef.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_advance_parts.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_advance_parts.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
/usr/include/c++/11/string
/usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h
/usr/include/bits/wordsize.h
@@ -171,7 +171,7 @@ third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o
/usr/include/c++/11/typeinfo
/usr/include/c++/11/bits/nested_exception.h
/usr/include/c++/11/bits/streambuf.tcc
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/optional.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/optional.hpp
/usr/include/c++/11/memory
/usr/include/c++/11/bits/stl_uninitialized.h
/usr/include/c++/11/bits/stl_tempbuf.h
@@ -198,16 +198,16 @@ third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o
/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.82/LspCpp/third_party/uri/include/network/string_view.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/string_view.hpp
/usr/include/c++/11/cassert
/usr/include/assert.h
/usr/include/c++/11/limits
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_normalize.cpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_normalize.cpp
/usr/include/stdc-predef.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_normalize.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_normalize.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri.hpp
/usr/include/c++/11/iterator
/usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h
/usr/include/bits/wordsize.h
@@ -401,21 +401,21 @@ third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o
/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.82/LspCpp/third_party/uri/include/network/string_view.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/string_view.hpp
/usr/include/c++/11/cassert
/usr/include/assert.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/optional.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/config.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/encode.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/optional.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/config.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/encode.hpp
/usr/include/c++/11/cstring
/usr/include/string.h
/usr/include/strings.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/decode.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/translate.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri_builder.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_percent_encode.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/decode.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/translate.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri_builder.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_percent_encode.hpp
/usr/include/c++/11/vector
/usr/include/c++/11/bits/stl_vector.h
/usr/include/c++/11/bits/stl_bvector.h
@@ -436,14 +436,14 @@ third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o
/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/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/algorithm.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/algorithm_split.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/algorithm.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/algorithm_split.hpp
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse.cpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse.cpp
/usr/include/stdc-predef.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/string_view.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/string_view.hpp
/usr/include/c++/11/string
/usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h
/usr/include/bits/wordsize.h
@@ -618,7 +618,7 @@ third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o
/usr/include/c++/11/bits/stl_tempbuf.h
/usr/include/c++/11/bits/uniform_int_dist.h
/usr/include/c++/11/limits
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/grammar.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/grammar.hpp
/usr/include/c++/11/locale
/usr/include/c++/11/bits/locale_facets.h
/usr/include/c++/11/cwctype
@@ -643,8 +643,8 @@ third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o
/usr/include/c++/11/cstring
/usr/include/string.h
/usr/include/strings.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/optional.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/optional.hpp
/usr/include/c++/11/memory
/usr/include/c++/11/bits/stl_uninitialized.h
/usr/include/c++/11/bits/stl_raw_storage_iter.h
@@ -662,10 +662,10 @@ third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o
/usr/include/c++/11/backward/auto_ptr.h
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse_authority.cpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse_authority.cpp
/usr/include/stdc-predef.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse_authority.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse_authority.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
/usr/include/c++/11/string
/usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h
/usr/include/bits/wordsize.h
@@ -831,7 +831,7 @@ third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o
/usr/include/c++/11/typeinfo
/usr/include/c++/11/bits/nested_exception.h
/usr/include/c++/11/bits/streambuf.tcc
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/optional.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/optional.hpp
/usr/include/c++/11/memory
/usr/include/c++/11/bits/stl_uninitialized.h
/usr/include/c++/11/bits/stl_tempbuf.h
@@ -858,11 +858,11 @@ third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o
/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.82/LspCpp/third_party/uri/include/network/string_view.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/string_view.hpp
/usr/include/c++/11/cassert
/usr/include/assert.h
/usr/include/c++/11/limits
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/grammar.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/grammar.hpp
/usr/include/c++/11/locale
/usr/include/c++/11/bits/locale_facets.h
/usr/include/c++/11/cwctype
@@ -884,10 +884,10 @@ third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o
/usr/include/strings.h
third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_resolve.cpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_resolve.cpp
/usr/include/stdc-predef.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_resolve.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_resolve.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri.hpp
/usr/include/c++/11/iterator
/usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h
/usr/include/bits/wordsize.h
@@ -1081,25 +1081,25 @@ third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o
/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.82/LspCpp/third_party/uri/include/network/string_view.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/string_view.hpp
/usr/include/c++/11/cassert
/usr/include/assert.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/optional.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/config.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/encode.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/optional.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/config.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/encode.hpp
/usr/include/c++/11/cstring
/usr/include/string.h
/usr/include/strings.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/decode.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/translate.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri_builder.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/algorithm_find.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/decode.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/translate.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri_builder.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/algorithm_find.hpp
/usr/include/c++/11/cstddef
third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri.cpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri.cpp
/usr/include/stdc-predef.h
/usr/include/c++/11/cassert
/usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h
@@ -1296,7 +1296,7 @@ third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o
/usr/include/c++/11/functional
/usr/include/c++/11/bits/refwrap.h
/usr/include/c++/11/bits/std_function.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri.hpp
/usr/include/c++/11/iterator
/usr/include/c++/11/bits/stream_iterator.h
/usr/include/c++/11/memory
@@ -1313,31 +1313,31 @@ third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o
/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.82/LspCpp/third_party/uri/include/network/string_view.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/optional.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/config.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/encode.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/string_view.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/optional.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/config.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/encode.hpp
/usr/include/c++/11/cstring
/usr/include/string.h
/usr/include/strings.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/decode.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/translate.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri_builder.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_advance_parts.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_percent_encode.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/decode.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/translate.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri_builder.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_advance_parts.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_percent_encode.hpp
/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.82/LspCpp/third_party/uri/src/detail/uri_normalize.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_resolve.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/algorithm.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_normalize.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_resolve.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/algorithm.hpp
third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri_builder.cpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri_builder.cpp
/usr/include/stdc-predef.h
/usr/include/c++/11/locale
/usr/include/c++/11/bits/localefwd.h
@@ -1523,8 +1523,8 @@ third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o
/usr/include/c++/11/array
/usr/include/c++/11/bits/uses_allocator.h
/usr/include/c++/11/bits/invoke.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri_builder.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri_builder.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri.hpp
/usr/include/c++/11/iterator
/usr/include/c++/11/bits/stream_iterator.h
/usr/include/c++/11/algorithm
@@ -1550,25 +1550,25 @@ third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o
/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.82/LspCpp/third_party/uri/include/network/string_view.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/string_view.hpp
/usr/include/c++/11/cassert
/usr/include/assert.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/optional.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/config.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/encode.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/optional.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/config.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/encode.hpp
/usr/include/c++/11/cstring
/usr/include/string.h
/usr/include/strings.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/decode.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/detail/translate.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_normalize.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/uri_parse_authority.hpp
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/detail/algorithm.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/decode.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/detail/translate.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_normalize.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/uri_parse_authority.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/detail/algorithm.hpp
third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/uri_errors.cpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/uri_errors.cpp
/usr/include/stdc-predef.h
/usr/include/c++/11/string
/usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h
@@ -1717,7 +1717,7 @@ third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o
/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/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp
/usr/include/c++/11/system_error
/usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h
/usr/include/c++/11/stdexcept
@@ -1726,5 +1726,5 @@ third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o
/usr/include/c++/11/bits/cxxabi_init_exception.h
/usr/include/c++/11/typeinfo
/usr/include/c++/11/bits/nested_exception.h
- /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include/network/uri/config.hpp
+ /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include/network/uri/config.hpp
diff --git a/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/flags.make b/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
index 001b66741d..ffdfe61c01 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
+++ b/graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/flags.make
@@ -4,7 +4,7 @@
# compile CXX with /bin/c++
CXX_DEFINES =
-CXX_INCLUDES = -I/usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src -I/usr/local/src/asymptote-2.82/LspCpp/third_party/uri/include
+CXX_INCLUDES = -I/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src -I/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/include
CXX_FLAGS = -fPIE -D_FILE_OFFSET_BITS=64 -DUSEGC -I../gc-8.2.0/include -std=c++11 -Wall -Werror -Wno-parentheses -O2 -g -DNDEBUG
diff --git a/graphics/asymptote/LspCpp/third_party/uri/src/Makefile b/graphics/asymptote/LspCpp/third_party/uri/src/Makefile
index fca7499fb8..3ffc68f8da 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/src/Makefile
+++ b/graphics/asymptote/LspCpp/third_party/uri/src/Makefile
@@ -60,10 +60,10 @@ RM = /usr/bin/cmake -E rm -f
EQUALS = =
# The top-level source directory on which CMake was run.
-CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.82/LspCpp
+CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.83/LspCpp
# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.82/LspCpp
+CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.83/LspCpp
#=============================================================================
# Targets provided globally by CMake.
@@ -135,14 +135,14 @@ install/strip/fast: preinstall/fast
# The main all target
all: cmake_check_build_system
- cd /usr/local/src/asymptote-2.82/LspCpp && $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.82/LspCpp/CMakeFiles /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src//CMakeFiles/progress.marks
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/src/all
- $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.82/LspCpp/CMakeFiles 0
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.83/LspCpp/CMakeFiles /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src//CMakeFiles/progress.marks
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/src/all
+ $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.83/LspCpp/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/src/clean
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/src/clean
.PHONY : clean
# The main clean target
@@ -151,22 +151,22 @@ clean/fast: clean
# Prepare targets for installation.
preinstall: all
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/src/preinstall
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/src/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/src/preinstall
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/src/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+ cd /usr/local/src/asymptote-2.83/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/src/CMakeFiles/network-uri.dir/rule:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/src/CMakeFiles/network-uri.dir/rule
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/src/CMakeFiles/network-uri.dir/rule
.PHONY : third_party/uri/src/CMakeFiles/network-uri.dir/rule
# Convenience name for target.
@@ -175,7 +175,7 @@ network-uri: third_party/uri/src/CMakeFiles/network-uri.dir/rule
# fast build rule for target.
network-uri/fast:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/build
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(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
detail/uri_advance_parts.o: detail/uri_advance_parts.cpp.o
@@ -183,7 +183,7 @@ detail/uri_advance_parts.o: detail/uri_advance_parts.cpp.o
# target to build an object file
detail/uri_advance_parts.cpp.o:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.o
.PHONY : detail/uri_advance_parts.cpp.o
detail/uri_advance_parts.i: detail/uri_advance_parts.cpp.i
@@ -191,7 +191,7 @@ detail/uri_advance_parts.i: detail/uri_advance_parts.cpp.i
# target to preprocess a source file
detail/uri_advance_parts.cpp.i:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.i
.PHONY : detail/uri_advance_parts.cpp.i
detail/uri_advance_parts.s: detail/uri_advance_parts.cpp.s
@@ -199,7 +199,7 @@ detail/uri_advance_parts.s: detail/uri_advance_parts.cpp.s
# target to generate assembly for a file
detail/uri_advance_parts.cpp.s:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_advance_parts.cpp.s
.PHONY : detail/uri_advance_parts.cpp.s
detail/uri_normalize.o: detail/uri_normalize.cpp.o
@@ -207,7 +207,7 @@ detail/uri_normalize.o: detail/uri_normalize.cpp.o
# target to build an object file
detail/uri_normalize.cpp.o:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o
.PHONY : detail/uri_normalize.cpp.o
detail/uri_normalize.i: detail/uri_normalize.cpp.i
@@ -215,7 +215,7 @@ detail/uri_normalize.i: detail/uri_normalize.cpp.i
# target to preprocess a source file
detail/uri_normalize.cpp.i:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.i
.PHONY : detail/uri_normalize.cpp.i
detail/uri_normalize.s: detail/uri_normalize.cpp.s
@@ -223,7 +223,7 @@ detail/uri_normalize.s: detail/uri_normalize.cpp.s
# target to generate assembly for a file
detail/uri_normalize.cpp.s:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.s
.PHONY : detail/uri_normalize.cpp.s
detail/uri_parse.o: detail/uri_parse.cpp.o
@@ -231,7 +231,7 @@ detail/uri_parse.o: detail/uri_parse.cpp.o
# target to build an object file
detail/uri_parse.cpp.o:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.o
.PHONY : detail/uri_parse.cpp.o
detail/uri_parse.i: detail/uri_parse.cpp.i
@@ -239,7 +239,7 @@ detail/uri_parse.i: detail/uri_parse.cpp.i
# target to preprocess a source file
detail/uri_parse.cpp.i:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.i
.PHONY : detail/uri_parse.cpp.i
detail/uri_parse.s: detail/uri_parse.cpp.s
@@ -247,7 +247,7 @@ detail/uri_parse.s: detail/uri_parse.cpp.s
# target to generate assembly for a file
detail/uri_parse.cpp.s:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse.cpp.s
.PHONY : detail/uri_parse.cpp.s
detail/uri_parse_authority.o: detail/uri_parse_authority.cpp.o
@@ -255,7 +255,7 @@ detail/uri_parse_authority.o: detail/uri_parse_authority.cpp.o
# target to build an object file
detail/uri_parse_authority.cpp.o:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.o
.PHONY : detail/uri_parse_authority.cpp.o
detail/uri_parse_authority.i: detail/uri_parse_authority.cpp.i
@@ -263,7 +263,7 @@ detail/uri_parse_authority.i: detail/uri_parse_authority.cpp.i
# target to preprocess a source file
detail/uri_parse_authority.cpp.i:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.i
.PHONY : detail/uri_parse_authority.cpp.i
detail/uri_parse_authority.s: detail/uri_parse_authority.cpp.s
@@ -271,7 +271,7 @@ detail/uri_parse_authority.s: detail/uri_parse_authority.cpp.s
# target to generate assembly for a file
detail/uri_parse_authority.cpp.s:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_parse_authority.cpp.s
.PHONY : detail/uri_parse_authority.cpp.s
detail/uri_resolve.o: detail/uri_resolve.cpp.o
@@ -279,7 +279,7 @@ detail/uri_resolve.o: detail/uri_resolve.cpp.o
# target to build an object file
detail/uri_resolve.cpp.o:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o
.PHONY : detail/uri_resolve.cpp.o
detail/uri_resolve.i: detail/uri_resolve.cpp.i
@@ -287,7 +287,7 @@ detail/uri_resolve.i: detail/uri_resolve.cpp.i
# target to preprocess a source file
detail/uri_resolve.cpp.i:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.i
.PHONY : detail/uri_resolve.cpp.i
detail/uri_resolve.s: detail/uri_resolve.cpp.s
@@ -295,7 +295,7 @@ detail/uri_resolve.s: detail/uri_resolve.cpp.s
# target to generate assembly for a file
detail/uri_resolve.cpp.s:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.s
.PHONY : detail/uri_resolve.cpp.s
uri.o: uri.cpp.o
@@ -303,7 +303,7 @@ uri.o: uri.cpp.o
# target to build an object file
uri.cpp.o:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.o
.PHONY : uri.cpp.o
uri.i: uri.cpp.i
@@ -311,7 +311,7 @@ uri.i: uri.cpp.i
# target to preprocess a source file
uri.cpp.i:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.i
.PHONY : uri.cpp.i
uri.s: uri.cpp.s
@@ -319,7 +319,7 @@ uri.s: uri.cpp.s
# target to generate assembly for a file
uri.cpp.s:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri.cpp.s
.PHONY : uri.cpp.s
uri_builder.o: uri_builder.cpp.o
@@ -327,7 +327,7 @@ uri_builder.o: uri_builder.cpp.o
# target to build an object file
uri_builder.cpp.o:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.o
.PHONY : uri_builder.cpp.o
uri_builder.i: uri_builder.cpp.i
@@ -335,7 +335,7 @@ uri_builder.i: uri_builder.cpp.i
# target to preprocess a source file
uri_builder.cpp.i:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.i
.PHONY : uri_builder.cpp.i
uri_builder.s: uri_builder.cpp.s
@@ -343,7 +343,7 @@ uri_builder.s: uri_builder.cpp.s
# target to generate assembly for a file
uri_builder.cpp.s:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_builder.cpp.s
.PHONY : uri_builder.cpp.s
uri_errors.o: uri_errors.cpp.o
@@ -351,7 +351,7 @@ uri_errors.o: uri_errors.cpp.o
# target to build an object file
uri_errors.cpp.o:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.o
.PHONY : uri_errors.cpp.o
uri_errors.i: uri_errors.cpp.i
@@ -359,7 +359,7 @@ uri_errors.i: uri_errors.cpp.i
# target to preprocess a source file
uri_errors.cpp.i:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.i
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.i
.PHONY : uri_errors.cpp.i
uri_errors.s: uri_errors.cpp.s
@@ -367,7 +367,7 @@ uri_errors.s: uri_errors.cpp.s
# target to generate assembly for a file
uri_errors.cpp.s:
- cd /usr/local/src/asymptote-2.82/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.s
+ cd /usr/local/src/asymptote-2.83/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/uri_errors.cpp.s
.PHONY : uri_errors.cpp.s
# Help Target
@@ -418,6 +418,6 @@ help:
# 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.82/LspCpp && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+ cd /usr/local/src/asymptote-2.83/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/src/cmake_install.cmake b/graphics/asymptote/LspCpp/third_party/uri/src/cmake_install.cmake
index 7adcfd9711..f01ba61a01 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/src/cmake_install.cmake
+++ b/graphics/asymptote/LspCpp/third_party/uri/src/cmake_install.cmake
@@ -1,4 +1,4 @@
-# Install script for directory: /usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src
+# Install script for directory: /usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
@@ -43,6 +43,6 @@ if(NOT DEFINED CMAKE_OBJDUMP)
endif()
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
- file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "/usr/local/src/asymptote-2.82/LspCpp/third_party/uri/src/libnetwork-uri.a")
+ file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "/usr/local/src/asymptote-2.83/LspCpp/third_party/uri/src/libnetwork-uri.a")
endif()
diff --git a/graphics/asymptote/LspCpp/third_party/uri/test/optional_test.cpp b/graphics/asymptote/LspCpp/third_party/uri/test/optional_test.cpp
index 32170fd04b..0f0238f733 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/test/optional_test.cpp
+++ b/graphics/asymptote/LspCpp/third_party/uri/test/optional_test.cpp
@@ -163,6 +163,6 @@ TEST(optional_test, value_or_rvalue_reference_with_value) {
}
TEST(optional_test, assign_nullopt_to_nullopt) {
- network::optional<std::string> opt;
- opt = network::nullopt;
-} \ No newline at end of file
+ network::optional<std::string> opt;
+ opt = network::nullopt;
+}
diff --git a/graphics/asymptote/LspCpp/third_party/uri/test/uri_builder_test.cpp b/graphics/asymptote/LspCpp/third_party/uri/test/uri_builder_test.cpp
index 54e29e0c5c..4b2b9cd5e2 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/test/uri_builder_test.cpp
+++ b/graphics/asymptote/LspCpp/third_party/uri/test/uri_builder_test.cpp
@@ -684,9 +684,9 @@ TEST(builder_test, clear_query_test) {
}
TEST(uri_test, clear_query_params_with_no_query) {
- network::uri original("http://example.com/path");
- network::uri_builder builder(original);
- builder.clear_query();
+ network::uri original("http://example.com/path");
+ network::uri_builder builder(original);
+ builder.clear_query();
}
TEST(builder_test, clear_fragment_test) {
diff --git a/graphics/asymptote/LspCpp/third_party/uri/test/uri_encoding_test.cpp b/graphics/asymptote/LspCpp/third_party/uri/test/uri_encoding_test.cpp
index 47bb4fdd43..4c97d87258 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/test/uri_encoding_test.cpp
+++ b/graphics/asymptote/LspCpp/third_party/uri/test/uri_encoding_test.cpp
@@ -13,7 +13,7 @@ TEST(uri_encoding_test, encode_user_info_iterator) {
const std::string unencoded("!#$&'()*+,/:;=?@[]");
std::string instance;
network::uri::encode_user_info(std::begin(unencoded), std::end(unencoded),
- std::back_inserter(instance));
+ std::back_inserter(instance));
ASSERT_EQ("%21%23%24%26%27%28%29%2A%2B%2C%2F:%3B%3D%3F%40%5B%5D", instance);
}
@@ -21,7 +21,7 @@ TEST(uri_encoding_test, encode_host_iterator) {
const std::string unencoded("!#$&'()*+,/:;=?@[]");
std::string instance;
network::uri::encode_host(std::begin(unencoded), std::end(unencoded),
- std::back_inserter(instance));
+ std::back_inserter(instance));
ASSERT_EQ("%21%23%24%26%27%28%29%2A%2B%2C%2F:%3B%3D%3F%40[]", instance);
}
@@ -29,7 +29,7 @@ TEST(uri_encoding_test, encode_ipv6_host) {
const std::string unencoded("[::1]");
std::string instance;
network::uri::encode_host(std::begin(unencoded), std::end(unencoded),
- std::back_inserter(instance));
+ std::back_inserter(instance));
ASSERT_EQ("[::1]", instance);
}
@@ -37,7 +37,7 @@ TEST(uri_encoding_test, encode_port_iterator) {
const std::string unencoded("!#$&'()*+,/:;=?@[]");
std::string instance;
network::uri::encode_port(std::begin(unencoded), std::end(unencoded),
- std::back_inserter(instance));
+ std::back_inserter(instance));
ASSERT_EQ("%21%23%24%26%27%28%29%2A%2B%2C%2F%3A%3B%3D%3F%40%5B%5D", instance);
}
@@ -45,7 +45,7 @@ TEST(uri_encoding_test, encode_path_iterator) {
const std::string unencoded("!#$&'()*+,/:;=?@[]");
std::string instance;
network::uri::encode_path(std::begin(unencoded), std::end(unencoded),
- std::back_inserter(instance));
+ std::back_inserter(instance));
ASSERT_EQ("%21%23%24%26%27%28%29%2A%2B%2C/%3A;=%3F@%5B%5D", instance);
}
@@ -69,7 +69,7 @@ TEST(uri_encoding_test, decode_iterator) {
const std::string encoded("%21%23%24%26%27%28%29%2A%2B%2C%2F%3A%3B%3D%3F%40%5B%5D");
std::string instance;
network::uri::decode(std::begin(encoded), std::end(encoded),
- std::back_inserter(instance));
+ std::back_inserter(instance));
ASSERT_EQ("!#$&'()*+,/:;=?@[]", instance);
}
@@ -77,62 +77,62 @@ TEST(uri_encoding_test, decode_iterator_error_1) {
const std::string encoded("%");
std::string instance;
ASSERT_THROW(network::uri::decode(std::begin(encoded), std::end(encoded),
- std::back_inserter(instance)),
- network::percent_decoding_error);
+ std::back_inserter(instance)),
+ network::percent_decoding_error);
}
TEST(uri_encoding_test, decode_iterator_error_2) {
const std::string encoded("%2");
std::string instance;
ASSERT_THROW(network::uri::decode(std::begin(encoded), std::end(encoded),
- std::back_inserter(instance)),
- network::percent_decoding_error);
+ std::back_inserter(instance)),
+ network::percent_decoding_error);
}
TEST(uri_encoding_test, decode_iterator_error_3) {
const std::string encoded("%%%");
std::string instance;
ASSERT_THROW(network::uri::decode(std::begin(encoded), std::end(encoded),
- std::back_inserter(instance)),
- network::percent_decoding_error);
+ std::back_inserter(instance)),
+ network::percent_decoding_error);
}
TEST(uri_encoding_test, decode_iterator_error_4) {
const std::string encoded("%2%");
std::string instance;
ASSERT_THROW(network::uri::decode(std::begin(encoded), std::end(encoded),
- std::back_inserter(instance)),
- network::percent_decoding_error);
+ std::back_inserter(instance)),
+ network::percent_decoding_error);
}
TEST(uri_encoding_test, decode_iterator_error_5) {
const std::string encoded("%G0");
std::string instance;
ASSERT_THROW(network::uri::decode(std::begin(encoded), std::end(encoded),
- std::back_inserter(instance)),
- network::percent_decoding_error);
+ std::back_inserter(instance)),
+ network::percent_decoding_error);
}
TEST(uri_encoding_test, decode_iterator_error_6) {
const std::string encoded("%0G");
std::string instance;
ASSERT_THROW(network::uri::decode(std::begin(encoded), std::end(encoded),
- std::back_inserter(instance)),
- network::percent_decoding_error);
+ std::back_inserter(instance)),
+ network::percent_decoding_error);
}
TEST(uri_encoding_test, decode_iterator_not_an_error_1) {
const std::string encoded("%20");
std::string instance;
ASSERT_NO_THROW(network::uri::decode(std::begin(encoded), std::end(encoded),
- std::back_inserter(instance)));
+ std::back_inserter(instance)));
}
TEST(uri_encoding_test, decode_iterator_not_an_error_2) {
const std::string encoded("%80");
std::string instance;
ASSERT_NO_THROW(network::uri::decode(std::begin(encoded), std::end(encoded),
- std::back_inserter(instance)));
+ std::back_inserter(instance)));
}
TEST(uri_encoding_test, decode_accepts_utf8) {
diff --git a/graphics/asymptote/LspCpp/third_party/uri/test/uri_test.cpp b/graphics/asymptote/LspCpp/third_party/uri/test/uri_test.cpp
index 62e224867a..ad3d58f45f 100644
--- a/graphics/asymptote/LspCpp/third_party/uri/test/uri_test.cpp
+++ b/graphics/asymptote/LspCpp/third_party/uri/test/uri_test.cpp
@@ -470,7 +470,7 @@ TEST(uri_test, range_test) {
const std::string url("http://www.example.com/");
network::uri instance(url);
EXPECT_TRUE(std::equal(std::begin(instance), std::end(instance),
- std::begin(url)));
+ std::begin(url)));
}
TEST(uri_test, issue_104_test) {
diff --git a/graphics/asymptote/LspCpp/third_party/utfcpp/samples/docsample.cpp b/graphics/asymptote/LspCpp/third_party/utfcpp/samples/docsample.cpp
index 6533887253..f1ec6b652c 100644
--- a/graphics/asymptote/LspCpp/third_party/utfcpp/samples/docsample.cpp
+++ b/graphics/asymptote/LspCpp/third_party/utfcpp/samples/docsample.cpp
@@ -50,15 +50,15 @@ int main(int argc, char** argv)
#if __cplusplus >= 201103L // C++ 11 or later
string utf8line = utf8::utf16to8(utf16line);
#else
- string utf8line;
+ string utf8line;
utf8::utf16to8(utf16line.begin(), utf16line.end(), back_inserter(utf8line));
#endif // C++ 11
// Confirm that the conversion went OK:
if (utf8line != string(line.begin(), end_it))
- cout << "Error in UTF-16 conversion at line: " << line_count << "\n";
+ cout << "Error in UTF-16 conversion at line: " << line_count << "\n";
line_count++;
- }
+ }
return 0;
}
diff --git a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/core.h b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/core.h
index de6199f2a3..d237e77a07 100644
--- a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/core.h
+++ b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/core.h
@@ -133,15 +133,15 @@ namespace internal
inline bool is_overlong_sequence(uint32_t cp, octet_difference_type length)
{
if (cp < 0x80) {
- if (length != 1)
+ if (length != 1)
return true;
}
else if (cp < 0x800) {
- if (length != 2)
+ if (length != 2)
return true;
}
else if (cp < 0x10000) {
- if (length != 3)
+ if (length != 3)
return true;
}
@@ -163,7 +163,7 @@ namespace internal
return UTF8_OK;
}
- #define UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(IT, END) {utf_error ret = increase_safely(IT, END); if (ret != UTF8_OK) return ret;}
+ #define UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(IT, END) {utf_error ret = increase_safely(IT, END); if (ret != UTF8_OK) return ret;}
/// get_sequence_x functions decode utf-8 sequences of the length x
template <typename octet_iterator>
@@ -180,7 +180,7 @@ namespace internal
template <typename octet_iterator>
utf_error get_sequence_2(octet_iterator& it, octet_iterator end, uint32_t& code_point)
{
- if (it == end)
+ if (it == end)
return NOT_ENOUGH_ROOM;
code_point = utf8::internal::mask8(*it);
@@ -197,7 +197,7 @@ namespace internal
{
if (it == end)
return NOT_ENOUGH_ROOM;
-
+
code_point = utf8::internal::mask8(*it);
UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
@@ -282,7 +282,7 @@ namespace internal
else
err = OVERLONG_SEQUENCE;
}
- else
+ else
err = INVALID_CODE_POINT;
}
@@ -330,7 +330,7 @@ namespace internal
((it != end) && (utf8::internal::mask8(*it++)) == bom[1]) &&
((it != end) && (utf8::internal::mask8(*it)) == bom[2])
);
- }
+ }
} // namespace utf8
#endif // header guard
diff --git a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp11.h b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp11.h
index d93961b04f..77771ff8e1 100644
--- a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp11.h
+++ b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp11.h
@@ -96,7 +96,7 @@ namespace utf8
{
return starts_with_bom(s.begin(), s.end());
}
-
+
} // namespace utf8
#endif // header guard
diff --git a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp17.h b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp17.h
index 7bfa869942..0205f12796 100644
--- a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp17.h
+++ b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp17.h
@@ -96,7 +96,7 @@ namespace utf8
{
return starts_with_bom(s.begin(), s.end());
}
-
+
} // namespace utf8
#endif // header guard
diff --git a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h
index 0e1b51cc7d..8bc34e8f65 100644
--- a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h
+++ b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h
@@ -110,18 +110,18 @@ namespace utf8
cp = ((cp << 6) & 0x7ff) + ((*it) & 0x3f);
break;
case 3:
- ++it;
+ ++it;
cp = ((cp << 12) & 0xffff) + ((utf8::internal::mask8(*it) << 6) & 0xfff);
++it;
cp += (*it) & 0x3f;
break;
case 4:
++it;
- cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff);
+ cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff);
++it;
cp += (utf8::internal::mask8(*it) << 6) & 0xfff;
++it;
- cp += (*it) & 0x3f;
+ cp += (*it) & 0x3f;
break;
}
++it;
@@ -162,7 +162,7 @@ namespace utf8
distance (octet_iterator first, octet_iterator last)
{
typename std::iterator_traits<octet_iterator>::difference_type dist;
- for (dist = 0; first < last; ++dist)
+ for (dist = 0; first < last; ++dist)
utf8::unchecked::next(first);
return dist;
}
@@ -234,15 +234,15 @@ namespace utf8
octet_iterator temp = it;
return utf8::unchecked::next(temp);
}
- bool operator == (const iterator& rhs) const
- {
+ bool operator == (const iterator& rhs) const
+ {
return (it == rhs.it);
}
bool operator != (const iterator& rhs) const
{
return !(operator == (rhs));
}
- iterator& operator ++ ()
+ iterator& operator ++ ()
{
::std::advance(it, utf8::internal::sequence_length(it));
return *this;
@@ -252,7 +252,7 @@ namespace utf8
iterator temp = *this;
::std::advance(it, utf8::internal::sequence_length(it));
return temp;
- }
+ }
iterator& operator -- ()
{
utf8::unchecked::prior(it);
@@ -267,7 +267,7 @@ namespace utf8
}; // class iterator
} // namespace utf8::unchecked
-} // namespace utf8
+} // namespace utf8
#endif // header guard
diff --git a/graphics/asymptote/LspCpp/third_party/utfcpp/tests/negative.cpp b/graphics/asymptote/LspCpp/third_party/utfcpp/tests/negative.cpp
index f1bcc993e0..26f72d9ef5 100644
--- a/graphics/asymptote/LspCpp/third_party/utfcpp/tests/negative.cpp
+++ b/graphics/asymptote/LspCpp/third_party/utfcpp/tests/negative.cpp
@@ -13,7 +13,7 @@ const unsigned* INVALID_LINES_END = INVALID_LINES + sizeof(INVALID_LINES)/sizeof
int main(int argc, char** argv)
{
string test_file_path;
- if (argc == 2)
+ if (argc == 2)
test_file_path = argv[1];
else {
cout << "Wrong number of arguments" << endl;