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