clang-tools 22.0.0git
clang::clangd::URIScheme Class Referenceabstract

URIScheme is an extension point for teaching clangd to recognize a custom URI scheme. More...

#include <URI.h>

Inheritance diagram for clang::clangd::URIScheme:
[legend]

Public Member Functions

virtual ~URIScheme ()=default
virtual llvm::Expected< std::string > getAbsolutePath (llvm::StringRef Authority, llvm::StringRef Body, llvm::StringRef HintPath) const =0
 Returns the absolute path of the file corresponding to the URI authority+body in the file system.
virtual llvm::Expected< URIuriFromAbsolutePath (llvm::StringRef AbsolutePath) const =0
virtual llvm::Expected< std::string > getIncludeSpelling (const URI &U) const
 Returns the include path of the file (e.g.

Detailed Description

URIScheme is an extension point for teaching clangd to recognize a custom URI scheme.

This is expected to be implemented and exposed via the URISchemeRegistry.

Definition at line 108 of file URI.h.

Constructor & Destructor Documentation

◆ ~URIScheme()

virtual clang::clangd::URIScheme::~URIScheme ( )
virtualdefault

Member Function Documentation

◆ getAbsolutePath()

virtual llvm::Expected< std::string > clang::clangd::URIScheme::getAbsolutePath ( llvm::StringRef Authority,
llvm::StringRef Body,
llvm::StringRef HintPath ) const
pure virtual

Returns the absolute path of the file corresponding to the URI authority+body in the file system.

See URI::resolve for semantics of HintPath.

Implemented in clang::clangd::TestScheme.

◆ getIncludeSpelling()

virtual llvm::Expected< std::string > clang::clangd::URIScheme::getIncludeSpelling ( const URI & U) const
inlinevirtual

Returns the include path of the file (e.g.

<path>, "path"), which can be #included directly. See URI::includeSpelling for details.

Definition at line 124 of file URI.h.

◆ uriFromAbsolutePath()

virtual llvm::Expected< URI > clang::clangd::URIScheme::uriFromAbsolutePath ( llvm::StringRef AbsolutePath) const
pure virtual

Implemented in clang::clangd::TestScheme.


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