clang-tools 17.0.0git
Classes | Public Member Functions | Static Public Member Functions | List of all members
clang::clangd::LSPClient Class Reference

#include <LSPClient.h>

Classes

class  CallResult
 
class  TransportImpl
 

Public Member Functions

 LSPClient ()
 
 ~LSPClient ()
 
 LSPClient (LSPClient &&)=delete
 
LSPClientoperator= (LSPClient &&)=delete
 
CallResultcall (llvm::StringRef Method, llvm::json::Value Params)
 
void notify (llvm::StringRef Method, llvm::json::Value Params)
 
std::vector< llvm::json::Value > takeNotifications (llvm::StringRef Method)
 
void stop ()
 
void didOpen (llvm::StringRef Path, llvm::StringRef Content)
 
void didChange (llvm::StringRef Path, llvm::StringRef Content)
 
void didClose (llvm::StringRef Path)
 
void sync ()
 
std::optional< std::vector< llvm::json::Value > > diagnostics (llvm::StringRef Path)
 
Transporttransport ()
 

Static Public Member Functions

static llvm::json::Value uri (llvm::StringRef Path)
 
static llvm::json::Value documentID (llvm::StringRef Path)
 

Detailed Description

Definition at line 26 of file LSPClient.h.

Constructor & Destructor Documentation

◆ LSPClient() [1/2]

clang::clangd::LSPClient::LSPClient ( )

Definition at line 142 of file LSPClient.cpp.

◆ ~LSPClient()

clang::clangd::LSPClient::~LSPClient ( )
default

◆ LSPClient() [2/2]

clang::clangd::LSPClient::LSPClient ( LSPClient &&  )
delete

Member Function Documentation

◆ call()

LSPClient::CallResult & clang::clangd::LSPClient::call ( llvm::StringRef  Method,
llvm::json::Value  Params 
)

Definition at line 145 of file LSPClient.cpp.

References clang::clangd::logBody(), and clang::clangd::Method.

Referenced by sync().

◆ diagnostics()

std::optional< std::vector< llvm::json::Value > > clang::clangd::LSPClient::diagnostics ( llvm::StringRef  Path)

Definition at line 203 of file LSPClient.cpp.

References sync(), takeNotifications(), and uri().

◆ didChange()

void clang::clangd::LSPClient::didChange ( llvm::StringRef  Path,
llvm::StringRef  Content 
)

Definition at line 191 of file LSPClient.cpp.

References documentID(), and notify().

◆ didClose()

void clang::clangd::LSPClient::didClose ( llvm::StringRef  Path)

Definition at line 196 of file LSPClient.cpp.

References documentID(), and notify().

◆ didOpen()

void clang::clangd::LSPClient::didOpen ( llvm::StringRef  Path,
llvm::StringRef  Content 
)

Definition at line 185 of file LSPClient.cpp.

References notify(), and uri().

◆ documentID()

llvm::json::Value clang::clangd::LSPClient::documentID ( llvm::StringRef  Path)
static

Definition at line 181 of file LSPClient.cpp.

References uri().

Referenced by didChange(), and didClose().

◆ notify()

void clang::clangd::LSPClient::notify ( llvm::StringRef  Method,
llvm::json::Value  Params 
)

Definition at line 156 of file LSPClient.cpp.

References clang::clangd::logBody(), and clang::clangd::Method.

Referenced by didChange(), didClose(), and didOpen().

◆ operator=()

LSPClient & clang::clangd::LSPClient::operator= ( LSPClient &&  )
delete

◆ stop()

void clang::clangd::LSPClient::stop ( )

Definition at line 169 of file LSPClient.cpp.

◆ sync()

void clang::clangd::LSPClient::sync ( )

Definition at line 200 of file LSPClient.cpp.

References call(), and clang::clangd::LSPClient::CallResult::takeValue().

Referenced by diagnostics().

◆ takeNotifications()

std::vector< llvm::json::Value > clang::clangd::LSPClient::takeNotifications ( llvm::StringRef  Method)

Definition at line 165 of file LSPClient.cpp.

References clang::clangd::Method.

Referenced by diagnostics().

◆ transport()

Transport & clang::clangd::LSPClient::transport ( )

Definition at line 171 of file LSPClient.cpp.

◆ uri()

llvm::json::Value clang::clangd::LSPClient::uri ( llvm::StringRef  Path)
static

The documentation for this class was generated from the following files: