载入中...
搜索中...
未找到
eve::building_editing::BuildingAssemblyTarget类 参考final

Whole-house transaction target sharing the canonical runtime world state. @ownership Borrows a world; the host must destroy this target before the world. @thread Owner/editor thread only; staging does not publish observer callbacks. @lifetime Prepared operations own snapshots; they never retain the target/world. 更多...

#include <BuildingAssemblyTarget.h>

类 eve::building_editing::BuildingAssemblyTarget 继承关系图:
eve::editing::EditableTargetState eve::editing::IDomainOperationTarget eve::editing::IDomainOperationTargetStaging eve::editing::IEditableTarget eve::editing::IEditableTarget

类

struct  State
 

Public 成员函数

 BuildingAssemblyTarget (std::string id, building::PlacementWorld &world)
 Bind a host-owned world that outlives this target. @cost One small state allocation per target.
 
 ~BuildingAssemblyTarget () override
 Release owned staging state. @cost Linear in staged world size when destroying a clone.
 
editing::TargetId targetId () const override
 Return the stable target identity. @cost Copies the identity string per query.
 
editing::TargetDescriptor describe () const override
 Describe this transaction target. @cost Copies descriptor strings per inspection.
 
editing::Result< editing::DomainOperation > makeOperation (building::PreparedAssembly prepared) const
 Consume a prepared house gesture into one reversible editor operation. @cost Copies one candidate world per gesture; never invoke per preview frame.
 
editing::Result< void > applyDomainOperation (const editing::DomainOperation &operation) override
 Apply one validated domain operation.
 
std::unique_ptr< editing::IDomainOperationTarget > cloneDomainState () const override
 Clone the complete target state into an owning detached candidate.
 
editing::Result< void > commitDomainState (std::unique_ptr< editing::IDomainOperationTarget > candidate) override
 
- Public 成员函数 继承自 eve::editing::EditableTargetState
 EditableTargetState (Revision initial=1)
 Constructs the shared state with an explicit initial revision.
 
EditRegion dirtyRegion () const override
 Return the accumulated dirty region.
 
void clearDirtyRegion () override
 Discard the dirty region; the revision does not change.
 
std::uint64_t revision () const override
 Return the current revision.
 
Revision revisionValue () const noexcept
 Return the revision as the shared protocol revision type.
 
- Public 成员函数 继承自 eve::editing::IEditableTarget
virtual ~IEditableTarget ()=default
 Releases IEditableTarget resources.
 
virtual void * queryCapability (const CapabilityId &capability)
 Query an optional stable capability.
 
template<class C >
eve::OptionalRef< C > capability ()
 Query a capability through its interface-owned stable identity.
 
template<class C >
eve::OptionalRef< const C > capability () const
 Capability.
 
template<class C >
C * query ()
 Queries query.
 
template<class C >
const C * query () const
 Queries query.
 
- Public 成员函数 继承自 eve::editing::IDomainOperationTarget
 ~IDomainOperationTarget () override=default
 Releases IDomainOperationTarget resources.
 
- Public 成员函数 继承自 eve::editing::IDomainOperationTargetStaging
virtual ~IDomainOperationTargetStaging ()=default
 Releases IDomainOperationTargetStaging resources.
 
virtual Result< void > commitDomainState (std::unique_ptr< IDomainOperationTarget > candidate)=0
 Atomically publish a validated candidate state.
 

额外继承的成员函数

- Protected 成员函数 继承自 eve::editing::EditableTargetState
void widenDirty (int x, int y)
 Widen the dirty region without advancing the revision.
 
void widenDirty (const EditRegion &region)
 Widen the dirty region without advancing the revision.
 
void widenDirty ()
 Mark an unknown area dirty without advancing the revision.
 
void bumpRevision ()
 Advance the revision without touching the dirty region.
 
void setRevision (Revision revision)
 Adopt a revision observed elsewhere, without advancing it.
 
void setDirtyRegion (const EditRegion &region)
 Replace the dirty region wholesale, without advancing the revision.
 
void markDirty (int x, int y)
 Include one cell in the dirty region and advance the revision.
 
void markDirty (const EditRegion &region)
 Include a whole region and advance the revision.
 
void markDirty ()
 Mark an unknown area dirty and advance the revision.
 

详细描述

Whole-house transaction target sharing the canonical runtime world state. @ownership Borrows a world; the host must destroy this target before the world. @thread Owner/editor thread only; staging does not publish observer callbacks. @lifetime Prepared operations own snapshots; they never retain the target/world.

在文件 BuildingAssemblyTarget.h 第 17 行定义.

构造及析构函数说明

◆ BuildingAssemblyTarget()

eve::building_editing::BuildingAssemblyTarget::BuildingAssemblyTarget ( std::string  id,
building::PlacementWorld &  world 
)

Bind a host-owned world that outlives this target. @cost One small state allocation per target.

在文件 BuildingAssemblyTarget.cpp 第 12 行定义.

◆ ~BuildingAssemblyTarget()

eve::building_editing::BuildingAssemblyTarget::~BuildingAssemblyTarget ( )
overridedefault

Release owned staging state. @cost Linear in staged world size when destroying a clone.

成员函数说明

◆ applyDomainOperation()

editing::Result< void > eve::building_editing::BuildingAssemblyTarget::applyDomainOperation ( const editing::DomainOperation &  operation)
overridevirtual

Apply one validated domain operation.

参数
operationOperation whose target must match this target.
返回
Applied on mutation, otherwise a structured rejection or failure.
备注
Implementations are main-thread-affine unless their domain contract states otherwise.

实现了 eve::editing::IDomainOperationTarget.

在文件 BuildingAssemblyTarget.cpp 第 36 行定义.

引用了 eve::building::AssemblyService::applyReceipt(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::editing::DomainOperation::payload, result, eve::editing::DomainOperation::target, targetId, eve::editing::toPresentationValue(), eve::editing::DomainOperation::type, eve::Unsupported , 以及 value.

◆ cloneDomainState()

std::unique_ptr< editing::IDomainOperationTarget > eve::building_editing::BuildingAssemblyTarget::cloneDomainState ( ) const
overridevirtual

Clone the complete target state into an owning detached candidate.

返回
Owning candidate that shares no mutable state with the authoritative target.

实现了 eve::editing::IDomainOperationTargetStaging.

在文件 BuildingAssemblyTarget.cpp 第 49 行定义.

引用了 revision , 以及 eve::building::AssemblyService::snapshotWorld().

◆ commitDomainState()

editing::Result< void > eve::building_editing::BuildingAssemblyTarget::commitDomainState ( std::unique_ptr< editing::IDomainOperationTarget >  candidate)
override

◆ describe()

editing::TargetDescriptor eve::building_editing::BuildingAssemblyTarget::describe ( ) const
overridevirtual

Describe this transaction target. @cost Copies descriptor strings per inspection.

重载 eve::editing::IEditableTarget .

在文件 BuildingAssemblyTarget.cpp 第 16 行定义.

引用了 revision , 以及 targetId.

◆ makeOperation()

editing::Result< editing::DomainOperation > eve::building_editing::BuildingAssemblyTarget::makeOperation ( building::PreparedAssembly  prepared) const

◆ targetId()

editing::TargetId eve::building_editing::BuildingAssemblyTarget::targetId ( ) const
overridevirtual

Return the stable target identity. @cost Copies the identity string per query.

实现了 eve::editing::IEditableTarget.

在文件 BuildingAssemblyTarget.cpp 第 15 行定义.


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