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>
类 | |
| 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 ®ion) |
| 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 ®ion) |
| 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 ®ion) |
| 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()
|
overridedefault |
Release owned staging state. @cost Linear in staged world size when destroying a clone.
成员函数说明
◆ applyDomainOperation()
|
overridevirtual |
Apply one validated domain operation.
- 参数
-
operation Operation 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()
|
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()
|
override |
◆ describe()
|
overridevirtual |
Describe this transaction target. @cost Copies descriptor strings per inspection.
重载 eve::editing::IEditableTarget .
在文件 BuildingAssemblyTarget.cpp 第 16 行定义.
◆ makeOperation()
| editing::Result< editing::DomainOperation > eve::building_editing::BuildingAssemblyTarget::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.
- 返回
- Owning before/after operation; authoritative world remains unchanged.
在文件 BuildingAssemblyTarget.cpp 第 19 行定义.
引用了 eve::editing::DomainOperation::affectedObjects, eve::building::AssemblyService::commit(), committed, eve::Result< T >::failure(), eve::editing::DomainOperation::hasInverse, eve::editing::DomainOperation::inverse, eve::editing::DomainOperation::inverseType, eve::editing::DomainOperation::payload, eve::Result< T >::success(), eve::editing::DomainOperation::target, targetId, eve::editing::toEditingValue() , 以及 eve::editing::DomainOperation::type.
◆ targetId()
|
overridevirtual |
Return the stable target identity. @cost Copies the identity string per query.
实现了 eve::editing::IEditableTarget.
在文件 BuildingAssemblyTarget.cpp 第 15 行定义.
该类的文档由以下文件生成:
- src/modules/building/editing/BuildingAssemblyTarget.h
- src/modules/building/editing/BuildingAssemblyTarget.cpp
Public 成员函数 继承自