载入中...
搜索中...
未找到
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()

eve::resource::ResourceId::ResourceId ( )
default

Construct an invalid resource id.

被这些函数引用 parse().

成员函数说明

◆ isValid()

bool eve::resource::ResourceId::isValid ( ) const
inlinenoexcept

Whether this id passed the resource-name validation.

在文件 ResourceAccount.h 第 53 行定义.

◆ parse()

eve::Result< ResourceId > eve::resource::ResourceId::parse ( std::string_view  text)
static

Parse a resource id at a public input boundary.

参数
textNon-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.

被这些函数引用 eve::resource::ResourceCost::create().

◆ value()

const std::string & eve::resource::ResourceId::value ( ) const
inlinenoexcept

Return the canonical owned spelling.

在文件 ResourceAccount.h 第 56 行定义.

友元及相关函数文档

◆ operator<=>

auto operator<=> ( const ResourceId &  ,
const ResourceId &   
)
friend

Operator <=>.

◆ operator==

bool operator== ( const ResourceId &  ,
const ResourceId &   
)
friend

该类的文档由以下文件生成: