载入中...
搜索中...
未找到
SquirrelBinding.h 文件参考

The single Squirrel projection for common Result, Status and Value. 更多...

#include "common/Export.h"
#include "common/Result.h"
#include "common/Value.h"
#include <squirrel.h>
#include <simplesquirrel/simplesquirrel.hpp>
#include <cstddef>
#include <functional>
#include <string>
#include <utility>

浏览源代码.

类

struct  eve::script::SquirrelValueOptions
 Limits and provenance used by the Squirrel ↔ Value adapter. 更多...
 

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::script
 

函数

Result< Value > eve::script::valueFromSquirrel (HSQUIRRELVM vm, SQInteger index, const SquirrelValueOptions &options={})
 Convert one Squirrel value into the canonical owning Value tree.
 
Result< Value > eve::script::valueFromSquirrel (const ssq::Object &object, const SquirrelValueOptions &options={})
 Convert a rooted Squirrel object into the canonical owning Value tree.
 
Result< void > eve::script::pushValue (HSQUIRRELVM vm, const Value &value, const SquirrelValueOptions &options={})
 Push a canonical Value into the active Squirrel VM.
 
ssq::Table eve::script::projectDiagnostic (HSQUIRRELVM vm, const Diagnostic &diagnostic)
 Project one Diagnostic using the common script table schema.
 
ssq::Table eve::script::projectStatus (HSQUIRRELVM vm, const Status &status)
 Project one Status using the common script table schema.
 
ssq::Table eve::script::projectStatusResult (HSQUIRRELVM vm, const Status &status)
 Project a checked native status that carries no payload.
 
ssq::Table eve::script::projectStatusResult (HSQUIRRELVM vm, const Status &status, const Value &value)
 Project a checked native status together with its canonical payload.
 
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.
 
void eve::script::markResultHasValue (ssq::Table &result)
 Declare that a projected table received a payload the caller attached itself.
 
template<class T , class Projector >
ssq::Table eve::script::projectResult (HSQUIRRELVM vm, Result< T > &&result, Projector &&projector)
 Consume and project a value-bearing native Result.
 
ssq::Table eve::script::projectResult (HSQUIRRELVM vm, Result< void > &&result)
 Consume and project a void native Result using the common schema.
 
bool eve::script::ignoreResult (const ssq::Object &result, const std::string &reason)
 Mark a projected Result table as intentionally ignored by script.
 
void eve::script::exposeResultBindings (ssq::Table &eveTable)
 Expose the common script helpers under eve.result.
 

详细描述

The single Squirrel projection for common Result, Status and Value.

The conversion surface deliberately lives in common. Domain bindings may project their own checked result payload into eve::Value, but they must not invent a second result-table schema or a second recursive Squirrel value converter.

在文件 SquirrelBinding.h 中定义.