载入中...
搜索中...
未找到
RTSRelocationBindings.cpp
浏览该文件的文档.
8 cls.addFunc("relocateUnits", [vm = cls.getHandle()](RTS* self, ssq::Array units, int maxChecks) -> ssq::Table {
12 if (units.size() > 1024) throw ssq::TypeException("Relocation batches support at most 1024 units");
22 vm, Status::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, error.what(), "relocateUnits")));
RTS module owner and phase-one composition profile entry point.
The single Squirrel projection for common Result, Status and Value.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Status failure(StatusCode code, Diagnostic diagnostic)
Construct a failed status with one diagnostic.
Definition Status.cpp:28
Result< std::size_t > relocateUnits(const UnitRelocationBatch &batch)
Atomically relocate owned units; preserves orders and invalidates derived navigation routes....
Definition RTSRelocation.cpp:10
void exposeRelocationBindings(ssq::Class &cls)
Compose explicit, atomic placement operations at the movement binding boundary.
Definition RTSRelocationBindings.cpp:7
ssq::Table projectStatusResult(HSQUIRRELVM vm, const Status &status)
Project a checked native status that carries no payload.
Definition SquirrelBinding.cpp:524
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.
Definition SquirrelBinding.cpp:540
@ InvalidArgument