Revisioned ArchSpace document target for Inspector, tools and automation. 更多...
#include <ArchSpaceTarget.h>
Public 成员函数 | |
| ArchSpaceDocumentTarget (std::string id) | |
| Arch space document target. | |
| TargetId | targetId () const override |
| Target id. | |
| TargetDescriptor | describe () const override |
| Describe. | |
| void * | queryCapability (const CapabilityId &capability) override |
| Query Inspector property capability. @ownership Borrowed from this target; callers must not delete it. @lifetime Valid until this target is destroyed. | |
| Result< void > | applyDomainOperation (const DomainOperation &operation) override |
| Applies domain operation. | |
| std::unique_ptr< IDomainOperationTarget > | cloneDomainState () const override |
| Clones domain state. | |
| Result< void > | commitDomainState (std::unique_ptr< IDomainOperationTarget > candidate) override |
| Commits domain state. | |
| eve::Result< eve::Revision > | currentRevision (const SelectionSnapshot &selection) const override |
| Current revision. | |
| PropertySchema | schema (const SelectionSnapshot &selection) const override |
| Schema. | |
| PropertyReadResult | read (const SelectionSnapshot &selection, const PropertyPath &path) const override |
| Reads . | |
| Result< DomainOperation > | makeSet (const SelectionSnapshot &selection, const PropertyPath &path, const EditorValue &value, PropertySetMode mode) const override |
| Make set. | |
| Result< DomainOperation > | makeReset (const SelectionSnapshot &selection, const PropertyPath &path) const override |
| Make reset. | |
| Result< DomainOperation > | makeBootstrap (const std::string &siteId, const std::string &buildingId, const std::string &levelId, double levelHeight=3.0) const |
| Plan site→building→level creation on an empty document. | |
| Result< DomainOperation > | makeCreateRectRoom (const std::string &levelId, const std::string &roomId, std::string roomName, double originX, double originZ, double sizeX, double sizeZ, double wallHeight=3.0, double wallThickness=0.2, double slabThickness=0.2) const |
| Plan a rectangular room (four walls + slab + zone) under a level. | |
| Result< DomainOperation > | makeCreateWall (const std::string &levelId, const std::string &wallId, std::string wallName, archspace::Vec2 start, archspace::Vec2 end, double height=3.0, double thickness=0.2) const |
| Plan a single wall under a level. | |
| Result< DomainOperation > | makeCreateOpening (const std::string &wallId, const std::string &openingId, archspace::OpeningKind kind, double t, double width, double height, double sill=0.0) const |
| Plan a door/window opening on an existing wall. | |
| Result< DomainOperation > | makePlaceItem (const std::string &levelId, const std::string &itemId, std::string catalogId, archspace::Vec3 position, double yawDegrees=0.0) const |
| Plan a catalog item placement on a level. | |
| Result< DomainOperation > | makeDeleteNode (const ObjectId &id) const |
| Plan cascading deletion of one node. | |
| const archspace::Document & | document () const |
| Document. | |
| std::vector< EditorDiagnostic > | validate () const |
| Validate. | |
| EditorValue | snapshotValue () const override |
| Snapshot value. | |
| Result< void > | loadSnapshot (const EditorValue &snapshot) |
| Loads snapshot. | |
| Result< EditorGizmoSnapshot > | gizmo () const |
| Build a revision-bound overlay for walls, zones, items and openings. | |
| archspace::MeshBake | bakeMesh () const |
| Bake renderer-neutral triangle mesh for the current revision. | |
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. | |
| 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. | |
Public 成员函数 继承自 eve::editing::IPropertyProvider | |
| virtual | ~IPropertyProvider ()=default |
| Releases IPropertyProvider resources. | |
Public 成员函数 继承自 eve::editing::IEditingSnapshotProvider | |
| virtual | ~IEditingSnapshotProvider ()=default |
| Releases IEditingSnapshotProvider resources. | |
静态 Public 成员函数 | |
| static CapabilityId | propertyCapabilityId () |
| Capability identity published by describe() for Inspector property editing. | |
静态 Public 成员函数 继承自 eve::editing::IPropertyProvider | |
| static CapabilityId | editingCapabilityId () |
| Stable capability identity for generic property editing. | |
静态 Public 成员函数 继承自 eve::editing::IEditingSnapshotProvider | |
| static CapabilityId | editingCapabilityId () |
| Stable capability identity shared by every editable domain target. | |
额外继承的成员函数 | |
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. | |
详细描述
Revisioned ArchSpace document target for Inspector, tools and automation.
Mutations are expressed as reversible archspace.document.replace.v1 domain operations. High-level helpers (bootstrap/room/opening/item) plan those replacements without bypassing validation.
在文件 ArchSpaceTarget.h 第 55 行定义.
构造及析构函数说明
◆ ArchSpaceDocumentTarget()
|
explicit |
Arch space document target.
在文件 ArchSpaceTarget.cpp 第 182 行定义.
成员函数说明
◆ applyDomainOperation()
|
overridevirtual |
Applies domain operation.
实现了 eve::editing::IDomainOperationTarget.
在文件 ArchSpaceTarget.cpp 第 525 行定义.
引用了 eve::editing::EditableTargetState::bumpRevision(), operation, validate() , 以及 eve::editing::EditableTargetState::widenDirty().
被这些函数引用 loadSnapshot().
◆ bakeMesh()
|
inline |
Bake renderer-neutral triangle mesh for the current revision.
在文件 ArchSpaceTarget.h 第 131 行定义.
◆ cloneDomainState()
|
overridevirtual |
Clones domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 ArchSpaceTarget.cpp 第 541 行定义.
◆ commitDomainState()
|
overridevirtual |
Commits domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 ArchSpaceTarget.cpp 第 545 行定义.
◆ currentRevision()
|
overridevirtual |
Current revision.
重载 eve::editing::IPropertyProvider .
在文件 ArchSpaceTarget.cpp 第 218 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::editing::EditableTargetState::revisionValue() , 以及 eve::Result< T >::success().
◆ describe()
|
overridevirtual |
◆ document()
|
inline |
Document.
在文件 ArchSpaceTarget.h 第 121 行定义.
◆ gizmo()
| Result< EditorGizmoSnapshot > eve::archspace_editing::ArchSpaceDocumentTarget::gizmo | ( | ) | const |
Build a revision-bound overlay for walls, zones, items and openings.
在文件 ArchSpaceTarget.cpp 第 572 行定义.
引用了 eve::editing::GizmoPrimitive::color, eve::editing::GizmoPrimitive::dashed, eve::editing::GizmoPrimitive::direction, eve::archspace::Node::elevation, eve::archspace::Node::end, eve::archspace::Document::find(), eve::editing::GizmoPrimitive::id, eve::archspace::Item, eve::editing::GizmoPrimitive::kind, eve::editing::GizmoPrimitive::length, node, eve::archspace::Document::nodes(), eve::archspace::Opening, eve::archspace::openingKindName(), p, eve::editing::GizmoPrimitive::position, eve::editing::GizmoSnapshot::primitives, eve::editing::GizmoPrimitive::radius, eve::editing::EditableTargetState::revisionValue(), eve::editing::GizmoPrimitive::size, eve::archspace::Node::start, eve::editing::GizmoSnapshot::status, eve::editing::GizmoSnapshot::target, eve::editing::GizmoSnapshot::targetRevision, eve::editing::GizmoPrimitive::text, eve::archspace::Wall, eve::archspace::Vec2::x, eve::archspace::Vec2::z , 以及 eve::archspace::Zone.
◆ loadSnapshot()
| Result< void > eve::archspace_editing::ArchSpaceDocumentTarget::loadSnapshot | ( | const EditorValue & | snapshot | ) |
◆ makeBootstrap()
| Result< DomainOperation > eve::archspace_editing::ArchSpaceDocumentTarget::makeBootstrap | ( | const std::string & | siteId, |
| const std::string & | buildingId, | ||
| const std::string & | levelId, | ||
| double | levelHeight = 3.0 |
||
| ) | const |
Plan site→building→level creation on an empty document.
在文件 ArchSpaceTarget.cpp 第 432 行定义.
◆ makeCreateOpening()
| Result< DomainOperation > eve::archspace_editing::ArchSpaceDocumentTarget::makeCreateOpening | ( | const std::string & | wallId, |
| const std::string & | openingId, | ||
| archspace::OpeningKind | kind, | ||
| double | t, | ||
| double | width, | ||
| double | height, | ||
| double | sill = 0.0 |
||
| ) | const |
Plan a door/window opening on an existing wall.
在文件 ArchSpaceTarget.cpp 第 484 行定义.
引用了 created, eve::archspace::Document::createOpening(), height, kind, t , 以及 width.
◆ makeCreateRectRoom()
| Result< DomainOperation > eve::archspace_editing::ArchSpaceDocumentTarget::makeCreateRectRoom | ( | const std::string & | levelId, |
| const std::string & | roomId, | ||
| std::string | roomName, | ||
| double | originX, | ||
| double | originZ, | ||
| double | sizeX, | ||
| double | sizeZ, | ||
| double | wallHeight = 3.0, |
||
| double | wallThickness = 0.2, |
||
| double | slabThickness = 0.2 |
||
| ) | const |
Plan a rectangular room (four walls + slab + zone) under a level.
在文件 ArchSpaceTarget.cpp 第 446 行定义.
◆ makeCreateWall()
| Result< DomainOperation > eve::archspace_editing::ArchSpaceDocumentTarget::makeCreateWall | ( | const std::string & | levelId, |
| const std::string & | wallId, | ||
| std::string | wallName, | ||
| archspace::Vec2 | start, | ||
| archspace::Vec2 | end, | ||
| double | height = 3.0, |
||
| double | thickness = 0.2 |
||
| ) | const |
Plan a single wall under a level.
在文件 ArchSpaceTarget.cpp 第 470 行定义.
引用了 created, eve::archspace::Document::createWall(), end, height, start , 以及 thickness.
◆ makeDeleteNode()
| Result< DomainOperation > eve::archspace_editing::ArchSpaceDocumentTarget::makeDeleteNode | ( | const ObjectId & | id | ) | const |
Plan cascading deletion of one node.
在文件 ArchSpaceTarget.cpp 第 514 行定义.
◆ makePlaceItem()
| Result< DomainOperation > eve::archspace_editing::ArchSpaceDocumentTarget::makePlaceItem | ( | const std::string & | levelId, |
| const std::string & | itemId, | ||
| std::string | catalogId, | ||
| archspace::Vec3 | position, | ||
| double | yawDegrees = 0.0 |
||
| ) | const |
Plan a catalog item placement on a level.
在文件 ArchSpaceTarget.cpp 第 499 行定义.
引用了 itemId, placed, eve::archspace::Document::placeItem() , 以及 position.
◆ makeReset()
|
overridevirtual |
Make reset.
实现了 eve::editing::IPropertyProvider.
在文件 ArchSpaceTarget.cpp 第 423 行定义.
引用了 descriptor, eve::editing::PropertySchema::find(), makeSet(), path , 以及 schema().
被这些函数引用 makeSet().
◆ makeSet()
|
overridevirtual |
Make set.
实现了 eve::editing::IPropertyProvider.
在文件 ArchSpaceTarget.cpp 第 356 行定义.
引用了 eve::archspace::Node::catalogId, descriptor, eve::archspace::Node::elevation, eve::editing::PropertySchema::find(), eve::archspace::Document::findMutable(), eve::archspace::Node::height, makeReset(), eve::archspace::Node::name, node, number, eve::archspace::Node::openingHeight, path, eve::archspace::Document::replace(), schema(), eve::archspace::Node::sill, eve::archspace::Node::t, text, eve::archspace::Node::thickness, validate(), value, eve::archspace::Node::width , 以及 eve::archspace::Node::yawDegrees.
被这些函数引用 makeReset().
◆ propertyCapabilityId()
|
inlinestatic |
Capability identity published by describe() for Inspector property editing.
在文件 ArchSpaceTarget.h 第 66 行定义.
被这些函数引用 describe() , 以及 queryCapability().
◆ queryCapability()
|
overridevirtual |
Query Inspector property capability. @ownership Borrowed from this target; callers must not delete it. @lifetime Valid until this target is destroyed.
重载 eve::editing::IEditableTarget .
在文件 ArchSpaceTarget.cpp 第 192 行定义.
引用了 eve::editing::IEditableTarget::capability(), eve::editing::IEditingSnapshotProvider::editingCapabilityId() , 以及 propertyCapabilityId().
◆ read()
|
overridevirtual |
◆ schema()
|
overridevirtual |
Schema.
实现了 eve::editing::IPropertyProvider.
在文件 ArchSpaceTarget.cpp 第 225 行定义.
引用了 eve::archspace::Item, eve::archspace::Level, node, eve::archspace::nodeKindName(), eve::archspace::Opening, eve::editing::PropertySchema::properties, schema(), eve::editing::PropertySchema::typeId , 以及 eve::archspace::Wall.
被这些函数引用 makeReset(), makeSet(), read() , 以及 schema().
◆ snapshotValue()
|
overridevirtual |
◆ targetId()
|
inlineoverridevirtual |
◆ validate()
| std::vector< EditorDiagnostic > eve::archspace_editing::ArchSpaceDocumentTarget::validate | ( | ) | const |
Validate.
在文件 ArchSpaceTarget.cpp 第 341 行定义.
引用了 eve::archspace::Document::diagnostics(), line, eve::archspace::Document::nodeCount(), eve::PreconditionViolation , 以及 eve::editing::ruleDiagnostic().
被这些函数引用 applyDomainOperation() , 以及 makeSet().
该类的文档由以下文件生成:
- src/modules/archspace/editing/ArchSpaceTarget.h
- src/modules/archspace/editing/ArchSpaceTarget.cpp
Public 成员函数 继承自