| 1 |
#pragma once |
| 2 |
#include "LibLsp/JsonRpc/serializer.h" |
| 3 |
#include <string> |
| 4 |
struct lsDocumentUri |
| 5 |
{ |
| 6 |
static lsDocumentUri FromPath(AbsolutePath const& path); |
| 7 |
|
| 8 |
lsDocumentUri(); |
| 9 |
|
| 10 |
lsDocumentUri(AbsolutePath const& path); |
| 11 |
lsDocumentUri(lsDocumentUri const& other); |
| 12 |
; |
| 13 |
bool operator==(lsDocumentUri const& other) const; |
| 14 |
bool operator==(std::string const& other) const; |
| 15 |
void SetPath(AbsolutePath const& path); |
| 16 |
std::string GetRawPath() const; |
| 17 |
AbsolutePath GetAbsolutePath() const; |
| 18 |
|
| 19 |
std::string raw_uri_; |
| 20 |
void swap(lsDocumentUri& arg) noexcept |
| 21 |
{ |
| 22 |
raw_uri_.swap(arg.raw_uri_); |
| 23 |
} |
| 24 |
}; |
| 25 |
extern void Reflect(Writer& visitor, lsDocumentUri& value); |
| 26 |
extern void Reflect(Reader& visitor, lsDocumentUri& value); |
| 27 |
extern std::string make_file_scheme_uri(std::string const& absolute_path); |