clang-tools 10.0.0

Public Types | Public Attributes | List of all members
clang::clangd::PathMapping Struct Reference

PathMappings are a collection of paired client and server paths. More...

`#include <PathMapping.h>`

Collaboration diagram for clang::clangd::PathMapping:
[legend]

## Public Types
enum | Direction { Direction::ClientToServer, Direction::ServerToClient }

## Public Attributes
std::string | ClientPath
std::string | ServerPath

## Detailed Description

PathMappings are a collection of paired client and server paths.

These pairs are used to alter file:// URIs appearing in inbound and outbound LSP messages, as the client's environment may have source files or dependencies at different locations than the server. Therefore, both paths are stored as they appear in file URI bodies, e.g. /usr/include or /C:/config

For example, if the mappings were {{"/home/user", "/workarea"}}, then a client-to-server LSP message would have file:///home/user/foo.cpp remapped to file:///workarea/foo.cpp, and the same would happen for replies (in the opposite order).

Definition at line 33 of file PathMapping.h.

## Member Enumeration Documentation

## ◆ Direction

enum clang::clangd::PathMapping::Direction
| strong

Enumerator
ClientToServer |
ServerToClient |

Definition at line 36 of file PathMapping.h.

## Member Data Documentation

## ◆ ClientPath

std::string clang::clangd::PathMapping::ClientPath

Definition at line 34 of file PathMapping.h.

## ◆ ServerPath

std::string clang::clangd::PathMapping::ServerPath

Definition at line 35 of file PathMapping.h.

The documentation for this struct was generated from the following file:

- PathMapping.h