载入中...
搜索中...
未找到
eve::container::IContainer类 参考abstract

Borrowed container implementation owned by a domain adapter. 更多...

#include <Container.h>

类 eve::container::IContainer 继承关系图:
eve::building::BuildingGarrisonContainerAdapter eve::card::CardContainerAdapter eve::inventory::InventoryContainerAdapter eve::vehicle::VehicleSeatContainerAdapter

类

class  PreparedState
 Detached state prepared for an atomic container replacement. 更多...
 

Public 成员函数

virtual ~IContainer ()=default
 
virtual const ContainerDescriptor & descriptor () const noexcept=0
 Return immutable container metadata.
 
virtual Result< ContainerSnapshot > snapshot () const =0
 Return current lossless state without retaining adapter pointers.
 
virtual Result< void > validateInsert (const ContainerObject &object, std::optional< SlotIndex > destination, std::optional< MembershipId > ignoredObject=std::nullopt) const =0
 Validate insertion while optionally ignoring one moved object.
 
virtual Result< std::unique_ptr< PreparedState > > prepare (const ContainerSnapshot &expected, const ContainerSnapshot &candidate)=0
 Prepare an exact replacement from expected to candidate.
 

详细描述

Borrowed container implementation owned by a domain adapter.

在文件 Container.h 第 287 行定义.

构造及析构函数说明

◆ ~IContainer()

virtual eve::container::IContainer::~IContainer ( )
virtualdefault

成员函数说明

◆ descriptor()

virtual const ContainerDescriptor & eve::container::IContainer::descriptor ( ) const
pure virtualnoexcept

◆ prepare()

virtual Result< std::unique_ptr< PreparedState > > eve::container::IContainer::prepare ( const ContainerSnapshot &  expected,
const ContainerSnapshot &  candidate 
)
pure virtual

Prepare an exact replacement from expected to candidate.

参数
expectedSnapshot observed during transfer preflight.
candidateFully constructed post-transfer snapshot.
返回
A detached state whose commit and rollback operations cannot fail; no observable state may change before commit.
备注
The adapter must reject a stale expected snapshot. The adapter is borrowed and must outlive the returned state; the caller must externally serialize access to the adapter.

在 eve::building::BuildingGarrisonContainerAdapter, eve::card::CardContainerAdapter, eve::inventory::InventoryContainerAdapter , 以及 eve::vehicle::VehicleSeatContainerAdapter 内被实现.

◆ snapshot()

virtual Result< ContainerSnapshot > eve::container::IContainer::snapshot ( ) const
pure virtual

◆ validateInsert()

virtual Result< void > eve::container::IContainer::validateInsert ( const ContainerObject &  object,
std::optional< SlotIndex >  destination,
std::optional< MembershipId >  ignoredObject = std::nullopt 
) const
pure virtual

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