clang-tools  14.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::ValuetakeNotifications (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 ()
 
llvm::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 23 of file LSPClient.h.

Constructor & Destructor Documentation

◆ LSPClient() [1/2]

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

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

References ID, and clang::clangd::Method.

Referenced by sync().

◆ diagnostics()

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

Definition at line 194 of file LSPClient.cpp.

References ns1::ns2::D, sync(), takeNotifications(), and uri().

◆ didChange()

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

Definition at line 182 of file LSPClient.cpp.

References documentID(), and notify().

◆ didClose()

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

Definition at line 187 of file LSPClient.cpp.

References documentID(), and notify().

◆ didOpen()

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

Definition at line 176 of file LSPClient.cpp.

References notify(), and uri().

◆ documentID()

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

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

References 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 160 of file LSPClient.cpp.

◆ sync()

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

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

References clang::clangd::Method.

Referenced by diagnostics().

◆ transport()

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

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