载入中...
搜索中...
未找到
eve::material_editor::MaterialEditor类 参考final

Owned, UI-neutral material document with atomic patches and undo/redo. @ownership Owns the document, authority and transaction history; snapshots are detached values. @threadaffinity Owner thread only. No callbacks are invoked by this facade. @reentrancy Calls must not overlap. No runtime object pointers are retained. 更多...

#include <MaterialEditor.h>

Public 成员函数

 MaterialEditor (std::string targetId)
 Create a document with the canonical material defaults.
 
 MaterialEditor (const MaterialEditor &)=delete
 Self-referencing authority/history make editor instances immovable.
 
MaterialEditor & operator= (const MaterialEditor &)=delete
 Copy assignment is unavailable.
 
 MaterialEditor (MaterialEditor &&)=delete
 Move construction is unavailable.
 
MaterialEditor & operator= (MaterialEditor &&)=delete
 Move assignment is unavailable.
 
editing::Result< void > configureWorkspace (editor::EditorWorkspace &workspace) const
 Install default panels atomically; callers may customize the workspace afterwards.
 
editing::Result< void > setProperties (const editing::Value::Object &properties)
 Apply a property patch as one undo record; invalid patches leave document and history unchanged.
 
editing::Result< void > setProperty (std::string_view path, const editing::Value &value)
 Set one schema property through the same atomic patch path.
 
editing::Result< editing::Value > read (std::string_view path) const
 Read a property; unknown paths return NotFound rather than a default value.
 
editing::Value schema () const
 Return detached schema metadata for custom inspectors.
 
editing::Value snapshot () const
 Return the canonical versioned material snapshot.
 
editing::Result< void > restore (const editing::Value &snapshot)
 Import a canonical versioned snapshot as one undoable edit; failure preserves state. @cost Full-document validation and history construction; amortize at document open/import boundaries.
 
editing::Result< editor::TransactionReceipt > undo ()
 Undo the latest patch.
 
editing::Result< editor::TransactionReceipt > redo ()
 Redo the latest undone patch.
 
bool canUndo () const
 Query whether undo is available.
 
bool canRedo () const
 Query whether redo is available.
 
std::uint64_t revision () const
 Current authoritative document revision.
 

详细描述

Owned, UI-neutral material document with atomic patches and undo/redo. @ownership Owns the document, authority and transaction history; snapshots are detached values. @threadaffinity Owner thread only. No callbacks are invoked by this facade. @reentrancy Calls must not overlap. No runtime object pointers are retained.

在文件 MaterialEditor.h 第 19 行定义.

构造及析构函数说明

◆ MaterialEditor() [1/3]

eve::material_editor::MaterialEditor::MaterialEditor ( std::string  targetId)
explicit

Create a document with the canonical material defaults.

参数
targetIdStable nonempty document id.

在文件 MaterialEditor.cpp 第 14 行定义.

引用了 eve::material_editing::MaterialDocumentTarget::targetId().

◆ MaterialEditor() [2/3]

eve::material_editor::MaterialEditor::MaterialEditor ( const MaterialEditor &  )
delete

Self-referencing authority/history make editor instances immovable.

◆ MaterialEditor() [3/3]

eve::material_editor::MaterialEditor::MaterialEditor ( MaterialEditor &&  )
delete

Move construction is unavailable.

成员函数说明

◆ canRedo()

bool eve::material_editor::MaterialEditor::canRedo ( ) const
inline

Query whether redo is available.

在文件 MaterialEditor.h 第 57 行定义.

◆ canUndo()

bool eve::material_editor::MaterialEditor::canUndo ( ) const
inline

Query whether undo is available.

在文件 MaterialEditor.h 第 55 行定义.

◆ configureWorkspace()

Result< void > eve::material_editor::MaterialEditor::configureWorkspace ( editor::EditorWorkspace &  workspace) const

Install default panels atomically; callers may customize the workspace afterwards.

在文件 MaterialEditor.cpp 第 28 行定义.

引用了 descriptor, eve::Result< T >::failure(), id, eve::editor::WorkspacePanelDescriptor::id, region , 以及 title.

◆ operator=() [1/2]

MaterialEditor & eve::material_editor::MaterialEditor::operator= ( const MaterialEditor &  )
delete

Copy assignment is unavailable.

◆ operator=() [2/2]

MaterialEditor & eve::material_editor::MaterialEditor::operator= ( MaterialEditor &&  )
delete

Move assignment is unavailable.

引用了 snapshot.

◆ read()

Result< Value > eve::material_editor::MaterialEditor::read ( std::string_view  path) const

Read a property; unknown paths return NotFound rather than a default value.

在文件 MaterialEditor.cpp 第 113 行定义.

引用了 path , 以及 eve::material_editing::MaterialDocumentTarget::read().

◆ redo()

Result< editor::TransactionReceipt > eve::material_editor::MaterialEditor::redo ( )

Redo the latest undone patch.

在文件 MaterialEditor.cpp 第 153 行定义.

引用了 eve::editor::LocalTransactionBackend::redo().

◆ restore()

Result< void > eve::material_editor::MaterialEditor::restore ( const editing::Value &  snapshot)

Import a canonical versioned snapshot as one undoable edit; failure preserves state. @cost Full-document validation and history construction; amortize at document open/import boundaries.

在文件 MaterialEditor.cpp 第 144 行定义.

引用了 loaded, eve::material_editing::MaterialDocumentTarget::loadSnapshot(), setProperties() , 以及 snapshot().

◆ revision()

std::uint64_t eve::material_editor::MaterialEditor::revision ( ) const
inline

Current authoritative document revision.

在文件 MaterialEditor.h 第 59 行定义.

◆ schema()

Value eve::material_editor::MaterialEditor::schema ( ) const

Return detached schema metadata for custom inspectors.

在文件 MaterialEditor.cpp 第 121 行定义.

引用了 choices, properties , 以及 eve::material_editing::MaterialDocumentTarget::schema().

◆ setProperties()

◆ setProperty()

Result< void > eve::material_editor::MaterialEditor::setProperty ( std::string_view  path,
const editing::Value &  value 
)

Set one schema property through the same atomic patch path.

在文件 MaterialEditor.cpp 第 53 行定义.

引用了 path, setProperties() , 以及 value.

◆ snapshot()

Value eve::material_editor::MaterialEditor::snapshot ( ) const

Return the canonical versioned material snapshot.

在文件 MaterialEditor.cpp 第 142 行定义.

引用了 eve::material_editing::MaterialDocumentTarget::snapshotValue().

被这些函数引用 restore().

◆ undo()

Result< editor::TransactionReceipt > eve::material_editor::MaterialEditor::undo ( )

Undo the latest patch.

在文件 MaterialEditor.cpp 第 152 行定义.

引用了 eve::editor::LocalTransactionBackend::undo().


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