10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_DRAFTSTORE_H 11 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DRAFTSTORE_H 15 #include "clang/Basic/LLVM.h" 16 #include "llvm/ADT/StringMap.h" 45 llvm::Expected<std::string>
47 llvm::ArrayRef<TextDocumentContentChangeEvent> Changes);
53 mutable std::mutex Mutex;
54 llvm::StringMap<std::string> Drafts;
llvm::Expected< std::string > updateDraft(PathRef File, llvm::ArrayRef< TextDocumentContentChangeEvent > Changes)
Update the contents of the draft for File based on Changes.
llvm::StringRef PathRef
A typedef to represent a ref to file path.
void addDraft(PathRef File, StringRef Contents)
Replace contents of the draft for File with Contents.
llvm::Optional< std::string > getDraft(PathRef File) const
std::vector< Path > getActiveFiles() const
void removeDraft(PathRef File)
Remove the draft from the store.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
A thread-safe container for files opened in a workspace, addressed by filenames.