clang-tools 19.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 expectServerCall (llvm::StringRef Method)
 
void notify (llvm::StringRef Method, llvm::json::Value Params)
 
std::vector< llvm::json::Value > takeNotifications (llvm::StringRef Method)
 
std::vector< llvm::json::Value > takeCallParams (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 28 of file LSPClient.h.

Constructor & Destructor Documentation

◆ LSPClient() [1/2]

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

Definition at line 177 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 180 of file LSPClient.cpp.

References ID, 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 247 of file LSPClient.cpp.

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

◆ didChange()

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

Definition at line 235 of file LSPClient.cpp.

References documentID(), and notify().

◆ didClose()

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

Definition at line 240 of file LSPClient.cpp.

References documentID(), and notify().

◆ didOpen()

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

Definition at line 229 of file LSPClient.cpp.

References notify(), and uri().

◆ documentID()

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

Definition at line 225 of file LSPClient.cpp.

References uri().

Referenced by didChange(), and didClose().

◆ expectServerCall()

void clang::clangd::LSPClient::expectServerCall ( llvm::StringRef  Method)

Definition at line 191 of file LSPClient.cpp.

References clang::clangd::Method.

◆ notify()

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

Definition at line 195 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 213 of file LSPClient.cpp.

◆ sync()

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

Definition at line 244 of file LSPClient.cpp.

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

Referenced by diagnostics().

◆ takeCallParams()

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

Definition at line 209 of file LSPClient.cpp.

References clang::clangd::Method.

◆ takeNotifications()

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

Definition at line 204 of file LSPClient.cpp.

References clang::clangd::Method.

Referenced by diagnostics().

◆ transport()

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

Definition at line 215 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: