载入中...
搜索中...
未找到
SquirrelBindContext.h
浏览该文件的文档.
67 [[nodiscard]] ssq::Table fail(DiagnosticCode code, std::string message, std::string path = {}) const {
68 return projectStatusResult(vm_, Status::failure(Diagnostic::error(code, std::move(message), std::move(path), {},
#define EVENGINE_API_FOUNDATION_INLINE
仅供"只有内联成员"的类型使用的组宏:拥有者 dllexport,消费方不导入。
Definition Export.h:170
Move-only, checked operation results for the common layer.
The single Squirrel projection for common Result, Status and Value.
Pins the active VM and a stable diagnostic source for one expose() TU.
Definition SquirrelBindContext.h:32
ssq::Table failInvalid(std::string message, std::string path={}) const
Convenience InvalidArgument failure with this binder's source tag.
Definition SquirrelBindContext.h:78
constexpr BindContext(HSQUIRRELVM vm, const char *source) noexcept
Construct a binder for one expose() translation unit.
Definition SquirrelBindContext.h:40
ssq::Table fail(DiagnosticCode code, std::string message, std::string path={}) const
Project a binding-layer argument failure.
Definition SquirrelBindContext.h:67
constexpr const char * source() const noexcept
Diagnostic source tag for this binder.
Definition SquirrelBindContext.h:58
constexpr HSQUIRRELVM vm() const noexcept
Active Squirrel VM handle.
Definition SquirrelBindContext.h:49
ssq::Table checked(T *self, std::string nullMessage, Fn &&fn, std::string path={}) const
Null-self guard then project a void Result-producing call.
Definition SquirrelBindContext.h:109
ssq::Table checked(bool ready, std::string nullMessage, Fn &&fn, std::string path={}) const
Run fn and project its void Result when ready; otherwise fail.
Definition SquirrelBindContext.h:92
Definition BindingContracts.h:5
ssq::Table projectStatusResult(HSQUIRRELVM vm, const Status &status)
Project a checked native status that carries no payload.
Definition SquirrelBinding.cpp:454
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.
Definition SquirrelBindContext.h:145
void bindMethod(ssq::Class &cls, const char *name, F &&fn)
Register one script method while keeping a literal name for Binding Contracts.
Definition SquirrelBindContext.h:130
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.
Definition SquirrelBinding.cpp:470