载入中...
搜索中...
未找到
eve::resource::ResourceId类 参考
Strong identity of a resource kind, such as mana or gold.
更多...
#include <ResourceAccount.h>
Public 成员函数 | |
| ResourceId ()=default | |
| Construct an invalid resource id. | |
| bool | isValid () const noexcept |
| Whether this id passed the resource-name validation. | |
| const std::string & | value () const noexcept |
| Return the canonical owned spelling. | |
静态 Public 成员函数 | |
| static eve::Result< ResourceId > | parse (std::string_view text) |
| Parse a resource id at a public input boundary. | |
友元 | |
| bool | operator== (const ResourceId &, const ResourceId &) noexcept=default |
| auto | operator<=> (const ResourceId &, const ResourceId &) noexcept=default |
| Operator <=>. | |
详细描述
Strong identity of a resource kind, such as mana or gold.
在文件 ResourceAccount.h 第 40 行定义.
构造及析构函数说明
◆ ResourceId()
|
default |
Construct an invalid resource id.
被这些函数引用 parse().
成员函数说明
◆ isValid()
|
inlinenoexcept |
Whether this id passed the resource-name validation.
在文件 ResourceAccount.h 第 53 行定义.
◆ parse()
|
static |
Parse a resource id at a public input boundary.
- 参数
-
text Non-empty stable name without whitespace or control characters.
- 返回
- The validated id, or a rejected Result with a diagnostic.
在文件 ResourceAccount.cpp 第 38 行定义.
引用了 eve::Result< T >::failure(), ResourceId(), eve::Result< T >::success() , 以及 text.
◆ value()
|
inlinenoexcept |
Return the canonical owned spelling.
在文件 ResourceAccount.h 第 56 行定义.
友元及相关函数文档
◆ operator<=>
|
friend |
Operator <=>.
◆ operator==
|
friend |
该类的文档由以下文件生成:
- src/engine/common/ResourceAccount.h
- src/engine/common/ResourceAccount.cpp