载入中...
搜索中...
未找到
eve::procgen_editor::ProcgenScriptEditor类 参考

Workspace controller for one encapsulated procedural script module. 更多...

#include <ProcgenScriptEditor.h>

Public 成员函数

 ProcgenScriptEditor (std::string targetId)
 Construct an empty generator host.
 
 ProcgenScriptEditor (const ProcgenScriptEditor &)=delete
 
ProcgenScriptEditor & operator= (const ProcgenScriptEditor &)=delete
 
const procgen_editing::ProcgenScriptDocumentTarget & target () const noexcept
 Borrow the authoritative generator document.
 
procgen_editing::Result< void > configureWorkspace (editor::EditorWorkspace &workspace) const
 Install Modules / Preview / Inspector / Debug Stages panels.
 
procgen_editing::Result< void > loadModule (procgen_editing::ProcgenScriptModuleSpec spec)
 
procgen_editing::Result< void > loadModule (std::string uri, std::string id, std::string displayName, std::string kind, const procgen_editing::EditorValue &schema)
 
procgen_editing::Result< void > setParam (std::string key, procgen_editing::EditorValue value)
 Sets the param.
 
procgen_editing::Result< void > setInt (std::string key, int value)
 Sets the int.
 
procgen_editing::Result< void > setFloat (std::string key, double value)
 Sets the float.
 
procgen_editing::Result< void > setBool (std::string key, bool value)
 Sets the bool.
 
procgen_editing::Result< void > setString (std::string key, std::string value)
 Sets the string.
 
procgen_editing::Result< void > publishPreview (const procgen::PointSet *points, std::string stage, std::uint64_t expectedRevision)
 Copy a successful generation into the preview cache.
 
procgen_editing::Result< void > publishStage (const procgen::PointSet *points, std::string stage)
 Copy an intermediate debug stage without changing the displayed output unless it is selected.
 
procgen_editing::Result< void > failPreview (std::string message, std::uint64_t expectedRevision)
 
procgen_editing::Result< void > selectStage (std::string stage)
 Select stage.
 
procgen_editing::Result< void > setPointBudget (int budget)
 Sets the point budget.
 
procgen_editing::Result< void > setLive (bool enabled)
 Choose whether the presenter should rebuild on every parameter commit.
 
procgen_editing::Result< editor::TransactionReceipt > undo ()
 
procgen_editing::Result< editor::TransactionReceipt > redo ()
 
bool canUndo () const noexcept
 
bool canRedo () const noexcept
 Can redo.
 
bool isDirty () const noexcept
 True when dirty.
 
bool isContinuousRebuild () const noexcept
 True when the presenter should rebuild after every committed parameter edit.
 
std::uint64_t revision () const noexcept
 Revision.
 
std::uint64_t previewRevision () const noexcept
 Preview revision.
 
int pointBudget () const noexcept
 Point budget.
 
std::string moduleId () const
 Module id.
 
std::string moduleUri () const
 Module uri.
 
std::string displayName () const
 Display name.
 
std::string kind () const
 Kind.
 
std::string selectedStage () const
 Selected stage.
 
std::string previewFailureSummary () const
 Empty when the last publish succeeded; otherwise the failPreview summary.
 
int paramCount () const
 Param count.
 
std::string paramKey (int index) const
 Param key.
 
std::string paramLabel (int index) const
 Param label.
 
std::string paramKind (int index) const
 Param kind.
 
float paramMinimum (int index) const
 Param minimum.
 
float paramMaximum (int index) const
 Param maximum.
 
float paramStep (int index) const
 Param step.
 
int paramChoiceCount (int index) const
 Param choice count.
 
std::string paramChoice (int paramIndex, int choiceIndex) const
 Param choice.
 
int getInt (const std::string &key) const
 Returns the int.
 
float getFloat (const std::string &key) const
 Returns the float.
 
bool getBool (const std::string &key) const
 Returns the bool.
 
std::string getString (const std::string &key) const
 Returns the string.
 
int stageCount () const
 Stage count.
 
std::string stageName (int index) const
 Stage name.
 
int pointCount () const
 Point count.
 
float pointX (int index) const
 Point x.
 
float pointZ (int index) const
 Point z.
 
std::uint32_t pointSeed (int index) const
 Point seed.
 

详细描述

Workspace controller for one encapsulated procedural script module.

Owns the Params document and local undo. Script presenters run generate and publish copied PointSets; a stale or failed rebuild keeps the last successful preview on screen.

@ownership Editor owns the document and preview copies. PointSet arguments are borrowed only for the publish call. @threadaffinity Owner thread only. @reentrancy Does not invoke script generate callbacks.

在文件 ProcgenScriptEditor.h 第 36 行定义.

构造及析构函数说明

◆ ProcgenScriptEditor() [1/2]

eve::procgen_editor::ProcgenScriptEditor::ProcgenScriptEditor ( std::string  targetId)
explicit

Construct an empty generator host.

在文件 ProcgenScriptEditor.cpp 第 22 行定义.

◆ ProcgenScriptEditor() [2/2]

eve::procgen_editor::ProcgenScriptEditor::ProcgenScriptEditor ( const ProcgenScriptEditor &  )
delete

成员函数说明

◆ canRedo()

bool eve::procgen_editor::ProcgenScriptEditor::canRedo ( ) const
inlinenoexcept

Can redo.

在文件 ProcgenScriptEditor.h 第 104 行定义.

◆ canUndo()

bool eve::procgen_editor::ProcgenScriptEditor::canUndo ( ) const
inlinenoexcept

在文件 ProcgenScriptEditor.h 第 102 行定义.

◆ configureWorkspace()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::configureWorkspace ( editor::EditorWorkspace &  workspace) const

Install Modules / Preview / Inspector / Debug Stages panels.

注解
Does not retain workspace.

在文件 ProcgenScriptEditor.cpp 第 25 行定义.

引用了 eve::editor::EditorWorkspace::activatePanel(), context, id, order, eve::editor::EditorWorkspace::registerPanel(), eve::editor::EditorWorkspace::setPanelCapability(), eve::editor::EditorWorkspace::setPanelContext() , 以及 title.

◆ displayName()

std::string eve::procgen_editor::ProcgenScriptEditor::displayName ( ) const
inline

Display name.

在文件 ProcgenScriptEditor.h 第 120 行定义.

被这些函数引用 loadModule().

◆ failPreview()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::failPreview ( std::string  message,
std::uint64_t  expectedRevision 
)

◆ getBool()

bool eve::procgen_editor::ProcgenScriptEditor::getBool ( const std::string &  key) const

Returns the bool.

在文件 ProcgenScriptEditor.cpp 第 295 行定义.

引用了 found, key , 以及 eve::procgen_editing::ProcgenScriptDocumentTarget::values().

◆ getFloat()

float eve::procgen_editor::ProcgenScriptEditor::getFloat ( const std::string &  key) const

Returns the float.

在文件 ProcgenScriptEditor.cpp 第 288 行定义.

引用了 found, key , 以及 eve::procgen_editing::ProcgenScriptDocumentTarget::values().

◆ getInt()

int eve::procgen_editor::ProcgenScriptEditor::getInt ( const std::string &  key) const

Returns the int.

在文件 ProcgenScriptEditor.cpp 第 281 行定义.

引用了 found, key , 以及 eve::procgen_editing::ProcgenScriptDocumentTarget::values().

◆ getString()

std::string eve::procgen_editor::ProcgenScriptEditor::getString ( const std::string &  key) const

Returns the string.

在文件 ProcgenScriptEditor.cpp 第 302 行定义.

引用了 found, key, text , 以及 eve::procgen_editing::ProcgenScriptDocumentTarget::values().

◆ isContinuousRebuild()

bool eve::procgen_editor::ProcgenScriptEditor::isContinuousRebuild ( ) const
inlinenoexcept

True when the presenter should rebuild after every committed parameter edit.

在文件 ProcgenScriptEditor.h 第 108 行定义.

◆ isDirty()

bool eve::procgen_editor::ProcgenScriptEditor::isDirty ( ) const
inlinenoexcept

True when dirty.

在文件 ProcgenScriptEditor.h 第 106 行定义.

◆ kind()

std::string eve::procgen_editor::ProcgenScriptEditor::kind ( ) const
inline

Kind.

在文件 ProcgenScriptEditor.h 第 122 行定义.

被这些函数引用 loadModule().

◆ loadModule() [1/2]

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::loadModule ( procgen_editing::ProcgenScriptModuleSpec  spec)

◆ loadModule() [2/2]

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::loadModule ( std::string  uri,
std::string  id,
std::string  displayName,
std::string  kind,
const procgen_editing::EditorValue &  schema 
)

◆ moduleId()

std::string eve::procgen_editor::ProcgenScriptEditor::moduleId ( ) const
inline

Module id.

在文件 ProcgenScriptEditor.h 第 116 行定义.

◆ moduleUri()

std::string eve::procgen_editor::ProcgenScriptEditor::moduleUri ( ) const
inline

Module uri.

在文件 ProcgenScriptEditor.h 第 118 行定义.

◆ operator=()

ProcgenScriptEditor & eve::procgen_editor::ProcgenScriptEditor::operator= ( const ProcgenScriptEditor &  )
delete

◆ paramChoice()

std::string eve::procgen_editor::ProcgenScriptEditor::paramChoice ( int  paramIndex,
int  choiceIndex 
) const

Param choice.

在文件 ProcgenScriptEditor.cpp 第 275 行定义.

◆ paramChoiceCount()

int eve::procgen_editor::ProcgenScriptEditor::paramChoiceCount ( int  index) const

Param choice count.

在文件 ProcgenScriptEditor.cpp 第 271 行定义.

引用了 index.

◆ paramCount()

int eve::procgen_editor::ProcgenScriptEditor::paramCount ( ) const
inline

Param count.

在文件 ProcgenScriptEditor.h 第 129 行定义.

◆ paramKey()

std::string eve::procgen_editor::ProcgenScriptEditor::paramKey ( int  index) const

Param key.

在文件 ProcgenScriptEditor.cpp 第 234 行定义.

引用了 index.

◆ paramKind()

std::string eve::procgen_editor::ProcgenScriptEditor::paramKind ( int  index) const

◆ paramLabel()

std::string eve::procgen_editor::ProcgenScriptEditor::paramLabel ( int  index) const

Param label.

在文件 ProcgenScriptEditor.cpp 第 238 行定义.

引用了 index.

◆ paramMaximum()

float eve::procgen_editor::ProcgenScriptEditor::paramMaximum ( int  index) const

Param maximum.

在文件 ProcgenScriptEditor.cpp 第 263 行定义.

引用了 index.

◆ paramMinimum()

float eve::procgen_editor::ProcgenScriptEditor::paramMinimum ( int  index) const

Param minimum.

在文件 ProcgenScriptEditor.cpp 第 259 行定义.

引用了 index.

◆ paramStep()

float eve::procgen_editor::ProcgenScriptEditor::paramStep ( int  index) const

Param step.

在文件 ProcgenScriptEditor.cpp 第 267 行定义.

引用了 index.

◆ pointBudget()

int eve::procgen_editor::ProcgenScriptEditor::pointBudget ( ) const
inlinenoexcept

Point budget.

在文件 ProcgenScriptEditor.h 第 114 行定义.

◆ pointCount()

int eve::procgen_editor::ProcgenScriptEditor::pointCount ( ) const

Point count.

在文件 ProcgenScriptEditor.cpp 第 320 行定义.

◆ pointSeed()

std::uint32_t eve::procgen_editor::ProcgenScriptEditor::pointSeed ( int  index) const

Point seed.

在文件 ProcgenScriptEditor.cpp 第 332 行定义.

引用了 index, points , 以及 seed.

◆ pointX()

float eve::procgen_editor::ProcgenScriptEditor::pointX ( int  index) const

Point x.

在文件 ProcgenScriptEditor.cpp 第 322 行定义.

引用了 index, points , 以及 x.

◆ pointZ()

float eve::procgen_editor::ProcgenScriptEditor::pointZ ( int  index) const

Point z.

在文件 ProcgenScriptEditor.cpp 第 327 行定义.

引用了 index, points , 以及 z.

◆ previewFailureSummary()

std::string eve::procgen_editor::ProcgenScriptEditor::previewFailureSummary ( ) const
inline

Empty when the last publish succeeded; otherwise the failPreview summary.

在文件 ProcgenScriptEditor.h 第 126 行定义.

◆ previewRevision()

std::uint64_t eve::procgen_editor::ProcgenScriptEditor::previewRevision ( ) const
inlinenoexcept

Preview revision.

在文件 ProcgenScriptEditor.h 第 112 行定义.

◆ publishPreview()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::publishPreview ( const procgen::PointSet *  points,
std::string  stage,
std::uint64_t  expectedRevision 
)

Copy a successful generation into the preview cache.

参数
pointsBorrowed output; null is rejected. Not retained after return.
stageDebug-stage name also used as the displayed output.
expectedRevisionDocument revision observed before generate; mismatch keeps the old preview. @ownership points is borrowed for this call only. @lifetime points must outlive this call.

在文件 ProcgenScriptEditor.cpp 第 150 行定义.

引用了 eve::Result< T >::failure(), points , 以及 eve::procgen_editing::ProcgenScriptDocumentTarget::revision().

◆ publishStage()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::publishStage ( const procgen::PointSet *  points,
std::string  stage 
)

Copy an intermediate debug stage without changing the displayed output unless it is selected.

参数
pointsBorrowed stage output; null is rejected. Not retained after return. @ownership points is borrowed for this call only. @lifetime points must outlive this call.

在文件 ProcgenScriptEditor.cpp 第 169 行定义.

引用了 eve::Result< T >::failure() , 以及 points.

◆ redo()

procgen_editing::Result< editor::TransactionReceipt > eve::procgen_editor::ProcgenScriptEditor::redo ( )

◆ revision()

std::uint64_t eve::procgen_editor::ProcgenScriptEditor::revision ( ) const
inlinenoexcept

Revision.

在文件 ProcgenScriptEditor.h 第 110 行定义.

◆ selectedStage()

std::string eve::procgen_editor::ProcgenScriptEditor::selectedStage ( ) const
inline

Selected stage.

在文件 ProcgenScriptEditor.h 第 124 行定义.

◆ selectStage()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::selectStage ( std::string  stage)

Select stage.

在文件 ProcgenScriptEditor.cpp 第 192 行定义.

◆ setBool()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setBool ( std::string  key,
bool  value 
)

Sets the bool.

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

引用了 key, setParam() , 以及 value.

◆ setFloat()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setFloat ( std::string  key,
double  value 
)

Sets the float.

在文件 ProcgenScriptEditor.cpp 第 117 行定义.

引用了 key, setParam() , 以及 value.

◆ setInt()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setInt ( std::string  key,
int  value 
)

Sets the int.

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

引用了 key, setParam() , 以及 value.

◆ setLive()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setLive ( bool  enabled)

Choose whether the presenter should rebuild on every parameter commit.

参数
enabledTrue for continuous rebuild after each committed edit.

在文件 ProcgenScriptEditor.cpp 第 208 行定义.

引用了 enabled.

◆ setParam()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setParam ( std::string  key,
procgen_editing::EditorValue  value 
)

Sets the param.

在文件 ProcgenScriptEditor.cpp 第 106 行定义.

引用了 eve::editing::Absolute, key, eve::procgen_editing::ProcgenScriptDocumentTarget::makeSet() , 以及 value.

被这些函数引用 setBool(), setFloat(), setInt() , 以及 setString().

◆ setPointBudget()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setPointBudget ( int  budget)

Sets the point budget.

在文件 ProcgenScriptEditor.cpp 第 200 行定义.

◆ setString()

procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setString ( std::string  key,
std::string  value 
)

Sets the string.

在文件 ProcgenScriptEditor.cpp 第 125 行定义.

引用了 key, setParam() , 以及 value.

◆ stageCount()

int eve::procgen_editor::ProcgenScriptEditor::stageCount ( ) const
inline

Stage count.

在文件 ProcgenScriptEditor.h 第 156 行定义.

◆ stageName()

std::string eve::procgen_editor::ProcgenScriptEditor::stageName ( int  index) const

Stage name.

在文件 ProcgenScriptEditor.cpp 第 315 行定义.

引用了 index.

◆ target()

const procgen_editing::ProcgenScriptDocumentTarget & eve::procgen_editor::ProcgenScriptEditor::target ( ) const
inlinenoexcept

Borrow the authoritative generator document.

在文件 ProcgenScriptEditor.h 第 45 行定义.

◆ undo()

procgen_editing::Result< editor::TransactionReceipt > eve::procgen_editor::ProcgenScriptEditor::undo ( )

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