命名空间 | |
| namespace | detail |
类 | |
| class | BindContext |
| Pins the active VM and a stable diagnostic source for one expose() TU. 更多... | |
| struct | BindingContract |
| Complete script-facing contract for a native function or method. 更多... | |
| class | BindingContractRegistry |
| Registry consumed by compiler checks and tooling protocol adapters. 更多... | |
| struct | BindingParameterContract |
| One native binding parameter visible to EveScript tools and named arguments. 更多... | |
| struct | BindingSearchHit |
| Ranked Binding Contract hit from text search. 更多... | |
| class | Borrowed |
| Non-owning C++ observation with no implicit lifetime extension. 更多... | |
| class | BorrowedSquirrelObject |
| Borrowed view of a rooted Squirrel object for one synchronous call. 更多... | |
| class | IScriptModuleProvider |
| Pluggable script source backend for directories, archives, plugins, or memory. 更多... | |
| class | ISquirrelRootReleaser |
| Releases C++-owned Squirrel roots before Runtime destroys its VM. 更多... | |
| class | OwnedSquirrelObject |
| A rooted Squirrel reference owned by the C++ holder. 更多... | |
| struct | RuntimeHandleRef |
| Handle plus owner-lifetime epoch for a non-ECS registry object. 更多... | |
| class | RuntimeObjectRegistry |
| Slot/generation registry whose objects are exclusively unique-owned. 更多... | |
| class | RuntimePin |
RAII keep-alive for one RuntimeObjectRegistry entry. 更多... | |
| class | ScriptCompiler |
| Unified Runtime compiler facade for metadata, diagnostics, and module preparation. 更多... | |
| struct | ScriptCompletion |
| Tool-neutral completion item suitable for LSP, MCP, and editor adapters. 更多... | |
| struct | ScriptDiagnostic |
| Stable structured diagnostic shared by Runtime, LSP, MCP, and editor tools. 更多... | |
| struct | ScriptErrorContext |
| Structured snapshot of a script error: message, throw site and stack. 更多... | |
| struct | ScriptFrame |
| One call-stack frame captured while the script error is still live. 更多... | |
| struct | ScriptHover |
| Tool-neutral hover result for one script or binding symbol. 更多... | |
| struct | ScriptMetadata |
| Metadata retained for one compiled EveScript source unit. 更多... | |
| struct | ScriptModuleRequest |
| Logical module request emitted by an EveScript import declaration. 更多... | |
| class | ScriptModuleResolver |
| Owns providers, the static dependency graph, compiled closures, and module instances. 更多... | |
| struct | ScriptModuleSource |
| UTF-8 source and stable identity returned by a module provider. 更多... | |
| struct | ScriptPropertyMetadata |
| Inspector-facing metadata for one annotated script property. 更多... | |
| struct | ScriptSourceMap |
| Source map for a compiled script. 更多... | |
| struct | ScriptSourceMapEntry |
| One generated-to-original mapping segment. Native syntax uses identity mappings. 更多... | |
| struct | ScriptSourcePosition |
| Original EveScript source position. Lines and columns are one-based. 更多... | |
| struct | ScriptSymbolMetadata |
| Erased source-level symbol retained for tooling. 更多... | |
| struct | SquirrelValueOptions |
| Limits and provenance used by the Squirrel ↔ Value adapter. 更多... | |
类型定义 | |
| template<class T > | |
| using | Owned = std::unique_ptr< T > |
| C++ owning storage used by an object factory. | |
| using | ScriptValue = eve::Value |
| Canonical detached script value; it never aliases a VM object. | |
枚举 | |
| enum class | ScriptDiagnosticSeverity { Info , Warning , Error } |
| Severity of a structured EveScript compiler diagnostic. 更多... | |
| enum class | ScriptUnit { None , Seconds , Milliseconds , Radians , Degrees , Pixels , Meters } |
| Unit attached to a binding parameter or return value. 更多... | |
| enum class | ScriptModuleStatus { NotHandled , Found , Error } |
| Result of asking a provider to resolve or load a script module. 更多... | |
| enum class | ObjectSemantic { Value , Owned , Borrowed } |
| The only three meanings a script-facing object may have. 更多... | |
函数 | |
| EVENGINE_API_FOUNDATION void | registerEngineBindingContracts (BindingContractRegistry ®istry) |
| Registers the build-generated contracts for every SimpleSquirrel binding. | |
| const BindingContractRegistry & | generatedBindingContracts () |
| Process-wide generated Binding Contracts for this linked engine build. | |
| ScriptErrorContext | captureScriptError (HSQUIRRELVM vm) |
| Captures the pending runtime error from inside the Squirrel error handler. | |
| ScriptErrorContext | captureCompileError (HSQUIRRELVM vm) |
| Captures the last compilation error recorded by the VM. | |
| bool | parseCompileError (const std::string &text, std::string *source, int *line, int *column, std::string *message) |
| Parses the ssq compile message "Compile error at source:line:column msg". | |
| std::string | sourceLineText (const std::string &sourceText, int line) |
| Extracts one 1-based line from script source text. | |
| std::string | formatStackTrace (const std::vector< ScriptFrame > &frames) |
| Formats just the call-stack portion of a context. | |
| std::string | formatScriptError (const ScriptErrorContext &ctx) |
| Formats a context into a human-readable multi-line report. | |
| void | setLastScriptError (HSQUIRRELVM vm, ScriptErrorContext ctx) |
| Records the last error for a VM (thread-local, synchronous consumers). | |
| ScriptErrorContext | takeLastScriptError (HSQUIRRELVM vm) |
| Consumes and clears the last recorded error for a VM. | |
| const ScriptErrorContext * | peekLastScriptError (HSQUIRRELVM vm) |
| Peeks at the last recorded error for a VM without clearing it. | |
| void | clearLastScriptError (HSQUIRRELVM vm) |
| Drops any recorded error for a VM. | |
| std::string | formatLastScriptError (HSQUIRRELVM vm) |
| Formats the last captured error for a VM without consuming it. | |
| template<class F > | |
| void | bindMethod (ssq::Class &cls, const char *name, F &&fn) |
| Register one script method while keeping a literal name for Binding Contracts. | |
| template<class ScriptT , class Getter > | |
| void | bindNullSafe (ssq::Class &cls, const char *name, Getter getter, std::invoke_result_t< Getter, ScriptT & > whenNull) |
Register a null-safe getter that returns whenNull when self is null. | |
| Result< Value > | valueFromSquirrel (HSQUIRRELVM vm, SQInteger index, const SquirrelValueOptions &options={}) |
| Convert one Squirrel value into the canonical owning Value tree. | |
| Result< Value > | valueFromSquirrel (const ssq::Object &object, const SquirrelValueOptions &options={}) |
| Convert a rooted Squirrel object into the canonical owning Value tree. | |
| Result< void > | pushValue (HSQUIRRELVM vm, const Value &value, const SquirrelValueOptions &options={}) |
| Push a canonical Value into the active Squirrel VM. | |
| ssq::Table | projectDiagnostic (HSQUIRRELVM vm, const Diagnostic &diagnostic) |
| Project one Diagnostic using the common script table schema. | |
| ssq::Table | projectStatus (HSQUIRRELVM vm, const Status &status) |
| Project one Status using the common script table schema. | |
| ssq::Table | projectStatusResult (HSQUIRRELVM vm, const Status &status) |
| Project a checked native status that carries no payload. | |
| ssq::Table | projectStatusResult (HSQUIRRELVM vm, const Status &status, const Value &value) |
| Project a checked native status together with its canonical payload. | |
| ssq::Table | projectStatusResult (HSQUIRRELVM vm, const Status &status, ssq::Object value) |
| Project a checked native status together with an already-bound script object. | |
| void | markResultHasValue (ssq::Table &result) |
| Declare that a projected table received a payload the caller attached itself. | |
| ssq::Table | projectResult (HSQUIRRELVM vm, Result< void > &&result) |
| Consume and project a void native Result using the common schema. | |
| bool | ignoreResult (const ssq::Object &result, const std::string &reason) |
| Mark a projected Result table as intentionally ignored by script. | |
| void | exposeResultBindings (ssq::Table &eveTable) |
Expose the common script helpers under eve.result. | |
| template<class T , class Projector > | |
| ssq::Table | projectResult (HSQUIRRELVM vm, Result< T > &&result, Projector &&projector) |
| Consume and project a value-bearing native Result. | |
| const char * | objectSemanticName (ObjectSemantic semantic) noexcept |
| Returns the stable name used by diagnostics and documentation. | |
| BorrowedSquirrelObject | borrowSquirrelObject (const ssq::Object &object) noexcept |
| Creates a one-call Borrowed view without retaining a VM reference. | |
| eve::Result< OwnedSquirrelObject > | ownSquirrelObject (BorrowedSquirrelObject borrowed) |
| Promotes a borrowed VM object to an explicit rooted owner. | |
| template<class T > | |
| eve::Result< ssq::Object > | makeOwnedSquirrelInstance (HSQUIRRELVM vm, Owned< T > object) |
| Creates a Squirrel instance that owns a C++ wrapper through a release hook. | |
类型定义说明
◆ Owned
| using eve::script::Owned = typedef std::unique_ptr<T> |
C++ owning storage used by an object factory.
- 模板参数
-
T Object whose destruction belongs to this owner.
- 备注
- Prefer this alias over a raw owning pointer. Ownership transfer is explicit through move construction or
std::move.
在文件 RuntimeRegistry.h 第 33 行定义.
◆ ScriptValue
| using eve::script::ScriptValue = typedef eve::Value |
Canonical detached script value; it never aliases a VM object.
在文件 SquirrelOwnership.h 第 63 行定义.
枚举类型说明
◆ ObjectSemantic
|
strong |
The only three meanings a script-facing object may have.
Value is a detached canonical eve::Value tree. Owned is rooted or otherwise responsible for destruction. Borrowed is an observation whose lifetime is bounded by its owner and which must never be retained across a mutation, frame, task, callback, restore, or module unload.
| 枚举值 | |
|---|---|
| Value | |
| Owned | |
| Borrowed | |
在文件 SquirrelOwnership.h 第 40 行定义.
◆ ScriptDiagnosticSeverity
|
strong |
Severity of a structured EveScript compiler diagnostic.
| 枚举值 | |
|---|---|
| Info | |
| Warning | |
| Error | |
在文件 ScriptCompiler.h 第 28 行定义.
◆ ScriptModuleStatus
|
strong |
Result of asking a provider to resolve or load a script module.
| 枚举值 | |
|---|---|
| NotHandled | |
| Found | |
| Error | |
在文件 ScriptModule.h 第 17 行定义.
◆ ScriptUnit
|
strong |
Unit attached to a binding parameter or return value.
| 枚举值 | |
|---|---|
| None | |
| Seconds | |
| Milliseconds | |
| Radians | |
| Degrees | |
| Pixels | |
| Meters | |
在文件 ScriptCompiler.h 第 117 行定义.
函数说明
◆ bindMethod()
|
inline |
Register one script method while keeping a literal name for Binding Contracts.
- 模板参数
-
F Callable accepted by ssq::Class::addFunc.
- 参数
-
cls Script class being filled. name Script-visible method name; must be a string literal at the call site so scripts/generate_binding_contracts.pycan scrape it.fn Member pointer, lambda, or std::functionpassed through to SimpleSquirrel.
- 备注
- Prefer this (or
cls.addFunc("literal", ...)) over building names at runtime.
Binds method.
在文件 SquirrelBindContext.h 第 130 行定义.
被这些函数引用 eve::animation::exposeAnimCurveLibraryBindings(), eve::animation::exposeAnimInertializerBindings() , 以及 eve::animation::exposeOrientationWarpingBindings().
◆ bindNullSafe()
|
inline |
Register a null-safe getter that returns whenNull when self is null.
- 模板参数
-
ScriptT Script wrapper pointer type. Getter Callable (ScriptT&) -> R.
- 参数
-
cls Script class being filled. name Script-visible method name (string literal for Contracts scrape). getter Invoked only when self is non-null. whenNull Value returned for a null self.
Binds null safe.
在文件 SquirrelBindContext.h 第 145 行定义.
◆ borrowSquirrelObject()
|
inlinenoexcept |
Creates a one-call Borrowed view without retaining a VM reference.
在文件 SquirrelOwnership.h 第 98 行定义.
◆ captureCompileError()
| EVENGINE_API_FOUNDATION ScriptErrorContext eve::script::captureCompileError | ( | HSQUIRRELVM | vm | ) |
Captures the last compilation error recorded by the VM.
- 参数
-
vm VM whose compile just failed (ssq's compiler handler stores it).
- 返回
- Context with message, source, line and column.
在文件 ScriptError.cpp 第 114 行定义.
引用了 eve::script::ScriptErrorContext::column, eve::script::ScriptErrorContext::line, eve::script::ScriptErrorContext::message, parseCompileError(), eve::script::ScriptErrorContext::source , 以及 vm.
被这些函数引用 eve::script::ScriptCompiler::compileBuffer(), eve::dev::ConsolePanel::eval() , 以及 eve::dev::Debugger::evaluate().
◆ captureScriptError()
| EVENGINE_API_FOUNDATION ScriptErrorContext eve::script::captureScriptError | ( | HSQUIRRELVM | vm | ) |
Captures the pending runtime error from inside the Squirrel error handler.
- 参数
-
vm VM whose error handler is executing (error value at stack slot 2).
- 返回
- Context with the message and the still-live call stack.
在文件 ScriptError.cpp 第 80 行定义.
引用了 eve::script::ScriptFrame::function, eve::script::ScriptErrorContext::function, level, eve::script::ScriptFrame::line, eve::script::ScriptErrorContext::line, eve::script::ScriptErrorContext::message, eve::script::ScriptFrame::source, eve::script::ScriptErrorContext::source, eve::script::ScriptErrorContext::stack , 以及 vm.
◆ clearLastScriptError()
| EVENGINE_API_FOUNDATION void eve::script::clearLastScriptError | ( | HSQUIRRELVM | vm | ) |
Drops any recorded error for a VM.
- 参数
-
vm VM whose pending error should be forgotten.
在文件 ScriptError.cpp 第 237 行定义.
引用了 vm.
被这些函数引用 eve::Runtime::shutdown().
◆ exposeResultBindings()
| EVENGINE_API_FOUNDATION void eve::script::exposeResultBindings | ( | ssq::Table & | eveTable | ) |
Expose the common script helpers under eve.result.
- 参数
-
eveTable Shared engine root table created by ModuleManager.
- 备注
- This is idempotent for the initial root-table exposure and must be called once by the common composition root.
在文件 SquirrelBinding.cpp 第 505 行定义.
引用了 ignoreResult() , 以及 value.
被这些函数引用 eve::ModuleManager::exposeVM().
◆ formatLastScriptError()
| EVENGINE_API_FOUNDATION std::string eve::script::formatLastScriptError | ( | HSQUIRRELVM | vm | ) |
Formats the last captured error for a VM without consuming it.
- 参数
-
vm VM to read.
- 返回
- Multi-line report, or empty when no error is pending.
在文件 ScriptError.cpp 第 242 行定义.
引用了 eve::script::ScriptErrorContext::empty(), formatScriptError(), peekLastScriptError() , 以及 vm.
被这些函数引用 eve::Runtime::initialize().
◆ formatScriptError()
| EVENGINE_API_FOUNDATION std::string eve::script::formatScriptError | ( | const ScriptErrorContext & | ctx | ) |
Formats a context into a human-readable multi-line report.
- 参数
-
ctx Context to format.
- 返回
- "source:line (function): message" plus optional hint and stack.
在文件 ScriptError.cpp 第 200 行定义.
引用了 formatStackTrace(), eve::script::ScriptErrorContext::function, eve::script::ScriptErrorContext::hint, eve::script::ScriptErrorContext::line, eve::script::ScriptErrorContext::message, eve::script::ScriptErrorContext::source , 以及 eve::script::ScriptErrorContext::stack.
被这些函数引用 eve::dev::ConsolePanel::eval(), eve::dev::Debugger::evaluate(), eve::Runtime::execute(), formatLastScriptError() , 以及 eve::ScriptException::ScriptException().
◆ formatStackTrace()
| EVENGINE_API_FOUNDATION std::string eve::script::formatStackTrace | ( | const std::vector< ScriptFrame > & | frames | ) |
Formats just the call-stack portion of a context.
- 参数
-
frames Frames to render, innermost first.
- 返回
- One "source:line in function" line per frame, newline separated.
在文件 ScriptError.cpp 第 186 行定义.
被这些函数引用 formatScriptError().
◆ generatedBindingContracts()
| const BindingContractRegistry & eve::script::generatedBindingContracts | ( | ) |
Process-wide generated Binding Contracts for this linked engine build.
- 返回
- Shared registry populated once from registerEngineBindingContracts. @ownership Borrowed; the process retains the registry. @lifetime Valid for the remainder of the process. @thread Safe to read from the main / MCP poll thread after static initialization.
在文件 ScriptCompiler.cpp 第 447 行定义.
◆ ignoreResult()
| EVENGINE_API_FOUNDATION bool eve::script::ignoreResult | ( | const ssq::Object & | result, |
| const std::string & | reason | ||
| ) |
Mark a projected Result table as intentionally ignored by script.
- 参数
-
result Projected Result table/object returned by a checked binding. reason Non-empty reason retained in ignoreReason.
- 返回
- True when the table was marked; false for a non-table or empty reason.
在文件 SquirrelBinding.cpp 第 475 行定义.
被这些函数引用 exposeResultBindings().
◆ makeOwnedSquirrelInstance()
| eve::Result< ssq::Object > eve::script::makeOwnedSquirrelInstance | ( | HSQUIRRELVM | vm, |
| Owned< T > | object | ||
| ) |
Creates a Squirrel instance that owns a C++ wrapper through a release hook.
The class for T* must have been registered in this VM with ssq::Table::addClass<T>(). The returned ssq::Object is itself a rooted owner and can safely cross the current native call into script storage.
- 备注
- This is a thin wrapper: the only per-type code it adds is the two one-line adapters above and the type hash.
Make owned squirrel instance.
Failure.
Make owned squirrel instance raw.
在文件 SquirrelOwnership.h 第 241 行定义.
引用了 eve::Result< T >::failure(), makeOwnedSquirrelInstance(), release , 以及 vm.
被这些函数引用 eve::daynight::exposeSkyScriptBindings(), eve::graphics::exposeVegetationScriptBindings() , 以及 makeOwnedSquirrelInstance().
◆ markResultHasValue()
| EVENGINE_API_FOUNDATION void eve::script::markResultHasValue | ( | ssq::Table & | result | ) |
Declare that a projected table received a payload the caller attached itself.
- 参数
-
result Table returned by a payload-free projectStatusResult call.
- 备注
- For payloads that only simplesquirrel can bind (a raw registered pointer, for example). Sets
hasValue = trueso the schema stays truthful; call it in the same statement that attaches the value, never on its own.
在文件 SquirrelBinding.cpp 第 468 行定义.
被这些函数引用 eve::graphics::exposeCanvasScriptBindings() , 以及 eve::graphics::exposeShaderScriptBindings().
◆ objectSemanticName()
|
inlinenoexcept |
Returns the stable name used by diagnostics and documentation.
- 返回
- A non-null borrowed pointer to immutable static text. @ownership Borrowed from program-static storage; callers must not free or modify the returned text. @nullable No. @lifetime Static for the process lifetime. @thread Thread-safe and side-effect free. @reentrancy Does not access the VM or invoke callbacks.
在文件 SquirrelOwnership.h 第 52 行定义.
◆ ownSquirrelObject()
|
inline |
Promotes a borrowed VM object to an explicit rooted owner.
- 参数
-
borrowed Object valid for the duration of this call.
- 返回
- A move-only owner, or a structured invalid-argument failure.
Failure.
Error.
Success.
在文件 SquirrelOwnership.h 第 160 行定义.
引用了 borrowed, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, ownSquirrelObject() , 以及 eve::Result< T >::success().
被这些函数引用 ownSquirrelObject() , 以及 eve::ui::ObjectRegistry::registerObject().
◆ parseCompileError()
| EVENGINE_API_FOUNDATION bool eve::script::parseCompileError | ( | const std::string & | text, |
| std::string * | source, | ||
| int * | line, | ||
| int * | column, | ||
| std::string * | message | ||
| ) |
Parses the ssq compile message "Compile error at source:line:column msg".
- 参数
-
text Message produced by ssq::CompileException::what(). source Receives the source name (may be nullptr). line Receives the 1-based line (may be nullptr). column Receives the 1-based column (may be nullptr). message Receives the raw compiler description (may be nullptr).
- 返回
- True when the message matched the expected layout.
在文件 ScriptError.cpp 第 131 行定义.
引用了 column, line, message, source , 以及 text.
被这些函数引用 captureCompileError().
◆ peekLastScriptError()
| EVENGINE_API_FOUNDATION const ScriptErrorContext * eve::script::peekLastScriptError | ( | HSQUIRRELVM | vm | ) |
Peeks at the last recorded error for a VM without clearing it.
- 参数
-
vm VM the error belongs to.
- 返回
- Pointer to the stored context, or nullptr when none is pending.
在文件 ScriptError.cpp 第 231 行定义.
被这些函数引用 eve::Runtime::execute(), formatLastScriptError() , 以及 eve::dev::DevTool::notifyError().
◆ projectDiagnostic()
| EVENGINE_API_FOUNDATION ssq::Table eve::script::projectDiagnostic | ( | HSQUIRRELVM | vm, |
| const Diagnostic & | diagnostic | ||
| ) |
Project one Diagnostic using the common script table schema.
在文件 SquirrelBinding.cpp 第 386 行定义.
引用了 eve::Diagnostic::code(), eve::Diagnostic::details(), eve::diagnosticCodeName(), key, eve::Diagnostic::message(), eve::Diagnostic::path(), eve::Diagnostic::severity(), eve::Diagnostic::source(), value , 以及 vm.
◆ projectResult() [1/2]
| ssq::Table eve::script::projectResult | ( | HSQUIRRELVM | vm, |
| Result< T > && | result, | ||
| Projector && | projector | ||
| ) |
Consume and project a value-bearing native Result.
- 参数
-
vm Active Squirrel VM. result Checked Result returned by a domain API. projector Domain-specific, non-throwing data projection.
- 返回
- A common
{ok, code, status, diagnostics, value, ...}table.
- 备注
- Calling this helper observes the Result on both success and failure. It therefore never relies on a domain
lastErrorslot.
Project result.
Project status result.
在文件 SquirrelBinding.h 第 132 行定义.
引用了 payload, projectStatusResult(), status , 以及 vm.
◆ projectResult() [2/2]
| EVENGINE_API_FOUNDATION ssq::Table eve::script::projectResult | ( | HSQUIRRELVM | vm, |
| Result< void > && | result | ||
| ) |
Consume and project a void native Result using the common schema.
在文件 SquirrelBinding.cpp 第 470 行定义.
引用了 projectStatusResult(), status , 以及 vm.
被这些函数引用 eve::housegen::HouseGen::expose(), eve::editor::exposeActionTimelineScriptBindings(), eve::animation::exposeAnimClipBindings(), eve::animation::exposeAnimCurveLibraryBindings(), eve::animation::exposeAnimInertializerBindings(), eve::graphics::exposeCanvasScriptBindings(), eve::climbing::exposeClimbingMotionBindings(), eve::rts::script_internal::exposeFormationBindings(), eve::graphics::exposeGrassWindBindings(), eve::procgen::exposeGridMeshGraphs(), eve::housegen::exposeHouseGeneration(), eve::scene::exposeLocationProfileBindings(), eve::procgen::exposeMeshModifierGraph(), eve::procgen::exposeModuleAssembly(), eve::animation::exposeMotionMatcherBindings(), eve::animation::exposeOrientationWarpingBindings(), eve::scene::exposePcgBuildConfigBindings(), eve::camera::exposePcgCarCameraSetupBindings(), eve::ui::exposePcgColorPreviewSyncBindings(), eve::ui::exposePcgControllerSelectionBindings(), eve::ui::exposePcgDraggableWindowBindings(), eve::procgen::exposePcgFrameRateManagerBindings(), eve::camera::exposePcgFreeCameraBindings(), eve::scene::exposePcgGrowthBindings(), eve::ui::exposePcgLoadingScreenBindings(), eve::ui::exposePcgPhotoModeApplyPlanBindings(), eve::ui::exposePcgPhotoModeColorPickerBindings(), eve::ui::exposePcgPhotoModePanelsBindings(), eve::ui::exposePcgPhotoModeRangesBindings(), eve::ui::exposePcgPhotoModeRuntimeUIBindings(), eve::ui::exposePcgPhotoModeSessionBindings(), eve::ui::exposePcgPhotoModeValuesBindings(), eve::ui::exposePcgScreenshotSavedNoticeBindings(), eve::ui::exposePcgTooltipBindings(), eve::graphics::exposePcgWaterPhotoModeBindings(), eve::graphics::detail::exposeRenderable3DBindings(), eve::graphics::detail::exposeShaderResourceBindings(), eve::graphics::exposeShaderScriptBindings(), eve::daynight::exposeSkyScriptBindings(), eve::graphics::exposeVegetationScriptBindings(), eve::fluids::exposeVolumeFluidFactory(), eve::fluids::exposeVolumeFluidType(), eve::graphics::exposeWaterPlanarReflectionBindings(), eve::graphics::exposeWaterReflectionMaskerBindings() , 以及 eve::graphics::exposeWaterSystemBindings().
◆ projectStatus()
| EVENGINE_API_FOUNDATION ssq::Table eve::script::projectStatus | ( | HSQUIRRELVM | vm, |
| const Status & | status | ||
| ) |
Project one Status using the common script table schema.
在文件 SquirrelBinding.cpp 第 450 行定义.
◆ projectStatusResult() [1/3]
| ssq::Table eve::script::projectStatusResult | ( | HSQUIRRELVM | vm, |
| const Status & | status | ||
| ) |
Project a checked native status that carries no payload.
- 参数
-
vm Active Squirrel VM. status Native status copied from the checked Result.
- 返回
- A table with the stable Result projection schema and
hasValue = false.
- 备注
okis derived fromstatus, so a caller can no longer hand the same outcome twice and make the table contradict itself.
在文件 SquirrelBinding.cpp 第 454 行定义.
被这些函数引用 eve::editor::exposeActionTimelineScriptBindings(), eve::graphics::exposeCanvasScriptBindings(), eve::climbing::exposeClimbingMotionBindings(), eve::rts::script_internal::exposeFormationBindings(), eve::procgen::exposeGridMeshGraphs(), eve::graphics::exposePrimitiveScriptBindings(), eve::scene_editor::exposeSceneEditorSessions(), eve::graphics::exposeShaderScriptBindings(), eve::daynight::exposeSkyScriptBindings(), eve::ui_editor::exposeUiThemeEditorScriptBindings(), eve::graphics::exposeVegetationScriptBindings(), eve::fluids::exposeVolumeFluidFactory(), eve::fluids::exposeVolumeFluidType(), eve::editor::project(), eve::editor::project(), eve::editor::projectOwnedInstance(), projectResult() , 以及 projectResult().
◆ projectStatusResult() [2/3]
| EVENGINE_API_FOUNDATION ssq::Table eve::script::projectStatusResult | ( | HSQUIRRELVM | vm, |
| const Status & | status, | ||
| const Value & | value | ||
| ) |
Project a checked native status together with its canonical payload.
- 参数
-
vm Active Squirrel VM. status Native status copied from the checked Result. value Payload to expose; passing one sets hasValue = true.
- 返回
- A table with the stable Result projection schema.
在文件 SquirrelBinding.cpp 第 456 行定义.
◆ projectStatusResult() [3/3]
| EVENGINE_API_FOUNDATION ssq::Table eve::script::projectStatusResult | ( | HSQUIRRELVM | vm, |
| const Status & | status, | ||
| ssq::Object | value | ||
| ) |
Project a checked native status together with an already-bound script object.
- 参数
-
vm Active Squirrel VM. status Native status copied from the checked Result. value Payload produced by makeOwnedSquirrelInstance/makeOwnedProxy and friends.
- 返回
- A table with the stable Result projection schema.
- 备注
- Payload presence is carried by the overload; there is no flag to disagree with.
在文件 SquirrelBinding.cpp 第 462 行定义.
◆ pushValue()
| EVENGINE_API_FOUNDATION Result< void > eve::script::pushValue | ( | HSQUIRRELVM | vm, |
| const Value & | value, | ||
| const SquirrelValueOptions & | options = {} |
||
| ) |
Push a canonical Value into the active Squirrel VM.
- 参数
-
vm Active Squirrel VM. value Owning value to project recursively. options Recursion, element-count and diagnostic-source policy.
- 返回
- Success with exactly one value pushed, or a diagnostic; on failure the VM stack is restored to its original height.
在文件 SquirrelBinding.cpp 第 369 行定义.
引用了 elements, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, options, eve::script::SquirrelValueOptions::source, eve::Result< T >::success(), top, value , 以及 vm.
◆ registerEngineBindingContracts()
| EVENGINE_API_FOUNDATION void eve::script::registerEngineBindingContracts | ( | BindingContractRegistry & | registry | ) |
Registers the build-generated contracts for every SimpleSquirrel binding.
被这些函数引用 generatedBindingContracts().
◆ setLastScriptError()
| EVENGINE_API_FOUNDATION void eve::script::setLastScriptError | ( | HSQUIRRELVM | vm, |
| ScriptErrorContext | ctx | ||
| ) |
Records the last error for a VM (thread-local, synchronous consumers).
- 参数
-
vm VM the error belongs to. ctx Context to store.
在文件 ScriptError.cpp 第 217 行定义.
引用了 vm.
◆ sourceLineText()
| EVENGINE_API_FOUNDATION std::string eve::script::sourceLineText | ( | const std::string & | sourceText, |
| int | line | ||
| ) |
◆ takeLastScriptError()
| EVENGINE_API_FOUNDATION ScriptErrorContext eve::script::takeLastScriptError | ( | HSQUIRRELVM | vm | ) |
Consumes and clears the last recorded error for a VM.
- 参数
-
vm VM the error belongs to.
- 返回
- The stored context, or an empty context when none is pending.
在文件 ScriptError.cpp 第 222 行定义.
被这些函数引用 eve::Runtime::createInstance(), eve::dev::ConsolePanel::eval() , 以及 eve::dev::Debugger::evaluate().
◆ valueFromSquirrel() [1/2]
| EVENGINE_API_FOUNDATION Result< Value > eve::script::valueFromSquirrel | ( | const ssq::Object & | object, |
| const SquirrelValueOptions & | options = {} |
||
| ) |
Convert a rooted Squirrel object into the canonical owning Value tree.
- 参数
-
object Rooted object whose VM owns the referenced value. options Recursion, element-count and diagnostic-source policy.
- 返回
- An owning Value, or a path-aware conversion diagnostic.
在文件 SquirrelBinding.cpp 第 356 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, options, eve::script::SquirrelValueOptions::source, top, valueFromSquirrel() , 以及 vm.
◆ valueFromSquirrel() [2/2]
| EVENGINE_API_FOUNDATION Result< Value > eve::script::valueFromSquirrel | ( | HSQUIRRELVM | vm, |
| SQInteger | index, | ||
| const SquirrelValueOptions & | options = {} |
||
| ) |
Convert one Squirrel value into the canonical owning Value tree.
- 参数
-
vm Active Squirrel VM; it must remain valid for the call. index Stack index of the value; both positive and negative indices are accepted. options Recursion, element-count and diagnostic-source policy.
- 返回
- An owning Value, or a path-aware conversion diagnostic.
- 备注
- The VM stack is restored to its original height before returning.
在文件 SquirrelBinding.cpp 第 342 行定义.
引用了 context, eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, options, output, eve::script::SquirrelValueOptions::source, eve::Result< T >::success(), top , 以及 vm.
被这些函数引用 eve::editor::exposeActionTimelineScriptBindings(), eve::scene_editor::exposeSceneEditorSessions(), eve::graphics::exposeVegetationScriptBindings(), eve::fluids::exposeVolumeFluidFactory(), eve::fluids::exposeVolumeFluidType() , 以及 valueFromSquirrel().