载入中...
搜索中...
未找到
ResourceAccount.h 文件参考

Strongly typed, transaction-friendly resource cost protocol. 更多...

#include "common/Export.h"
#include "common/Result.h"
#include "common/StrongUint64.h"
#include <compare>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <initializer_list>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

浏览源代码.

类

struct  eve::detail::ResourceReservationIdTag
 ResourceReservationIdTag public API. 更多...
 
struct  eve::detail::ResourceReceiptIdTag
 ResourceReceiptIdTag public API. 更多...
 
class  eve::resource::ResourceId
 Strong identity of a resource kind, such as mana or gold. 更多...
 
class  eve::resource::Amount
 Non-negative integral quantity used by resource accounts. 更多...
 
struct  eve::resource::ResourceCost
 One positive resource and quantity pair in a canonical cost. 更多...
 
struct  eve::resource::CostInput
 Convenient unvalidated input used by CostSpec::from(). 更多...
 
class  eve::resource::CostSpec
 Immutable canonical multi-resource cost. 更多...
 
struct  eve::resource::ResourceShortfall
 A resource missing from an affordability query. 更多...
 
struct  eve::resource::Affordability
 Structured answer to a canAfford query. 更多...
 
class  eve::resource::AccountNonce
 Opaque process-local identity of the account that issued a credential. 更多...
 
struct  eve::resource::Reservation
 Reservation credential returned by a successful reserve operation. 更多...
 
struct  eve::resource::Receipt
 Receipt proving one atomic debit or credit was applied. 更多...
 
class  eve::resource::IResourceAccount
 Provider-neutral resource account contract. 更多...
 
struct  std::hash< eve::resource::ResourceId >
 hash public API. 更多...
 

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::detail
 
namespace  eve::resource
 
namespace  std
 

类型定义

using eve::resource::ReservationId = eve::detail::StrongUint64< eve::detail::ResourceReservationIdTag >
 Process-local id of an active reservation.
 
using eve::resource::ReceiptId = eve::detail::StrongUint64< eve::detail::ResourceReceiptIdTag >
 Process-local id of an applied resource operation.
 

枚举

enum class  eve::resource::ReceiptOperation : std::uint8_t { eve::resource::Debit , eve::resource::Credit }
 Operation represented by a receipt returned from an account. 更多...
 

函数

eve::Result< AccountNonce > eve::resource::allocateAccountNonce ()
 Allocate a process-local account identity for a credential issuer.
 

详细描述

Strongly typed, transaction-friendly resource cost protocol.

The protocol deliberately owns no gameplay policy and no balance storage. An implementation may keep resources in an AttributeSet, an economy ledger, or another domain-specific store; the protocol only defines the atomic operation and reservation semantics at the boundary.

在文件 ResourceAccount.h 中定义.