载入中...
搜索中...
未找到
eve::ResourceUri类 参考
A semantically named resource locator. 更多...
#include <Uri.h>
Public 成员函数 | |
| UriScheme | scheme () const noexcept |
| Return the resource namespace. | |
| std::string_view | path () const noexcept |
| Return the relative virtual path, borrowed from this value. | |
| std::string_view | query () const noexcept |
| Return the query component, borrowed from this value. | |
| std::string_view | fragment () const noexcept |
| Return the fragment component, borrowed from this value. | |
| const std::string & | format () const noexcept |
| Return the stable canonical URI text owned by this value. | |
| const Uri & | uri () const noexcept |
| Return the structural URI view owned by this resource URI. | |
静态 Public 成员函数 | |
| static Result< ResourceUri > | parse (std::string_view text) |
| Parse a supported resource URI. | |
| static Result< ResourceUri > | fromParts (UriScheme scheme, std::string_view path, std::string_view query={}, std::string_view fragment={}) |
| Construct a resource URI from validated components. | |
| static Result< ResourceUri > | fromLegacyProjectPath (std::string_view path) |
| Explicitly convert a legacy project-relative path. | |
友元 | |
| bool | operator== (const ResourceUri &, const ResourceUri &) noexcept=default |
| Compare resource URI values. | |
详细描述
A semantically named resource locator.
Uri is the structural parser; ResourceUri is the type exposed at resource-module boundaries. Keeping this wrapper distinct prevents an arbitrary future URI value from being passed where a resource locator is expected, while retaining one canonical representation internally.
成员函数说明
◆ format()
|
inlinenoexcept |
◆ fragment()
|
inlinenoexcept |
◆ fromLegacyProjectPath()
|
static |
Explicitly convert a legacy project-relative path.
- 参数
-
path The old string facade's virtual path, not a URI.
- 返回
project://pathafter legacy separator normalization, or a diagnostic. Inputs containing://are never reinterpreted.
引用了 path.
◆ fromParts()
|
static |
◆ parse()
|
static |
Parse a supported resource URI.
- 参数
-
text Strict virtual URI; a bare filesystem path is rejected.
- 返回
- A checked resource URI or a parse diagnostic.
引用了 text.
被这些函数引用 eve::AssetRef::parse(), eve::ResourceRef::parse() , 以及 eve::filesystem::ResourceReader::read().
◆ path()
|
inlinenoexcept |
◆ query()
|
inlinenoexcept |
◆ scheme()
|
inlinenoexcept |
◆ uri()
|
inlinenoexcept |
友元及相关函数文档
◆ operator==
|
friend |
Compare resource URI values.
该类的文档由以下文件生成: