载入中...
搜索中...
未找到
RTSRelocation.cpp
浏览该文件的文档.
25 if (unit == nullptr) return failure(DiagnosticCode::NotFound, "Relocation unit not owned by this RTS");
31 return failure(DiagnosticCode::PreconditionViolation, "Contained unit cannot be relocated independently");
35 return failure(DiagnosticCode::PreconditionViolation, "Relocation requires a current Crowd projection");
60 Diagnostic::error(DiagnosticCode::Failed, "Cannot allocate relocation preparation", "relocationBatch"));
RTS module owner and phase-one composition profile entry point.
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 Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
static Status success(StatusCode code=StatusCode::Ok)
Construct a successful status with an explicit non-error outcome.
Definition Status.cpp:19
bool isAgentAlive(AgentRef reference) const noexcept
Whether the owner and generation still identify a live agent. @thread Simulation thread only; the cal...
Definition CrowdRegistry.cpp:124
Result< AgentBatchReceipt > relocateAgents(const AgentRelocationBatch &batch)
Atomically relocate live agents to exact clear positions; failure preserves all motion state....
Definition CrowdRelocation.cpp:7
Result< std::size_t > relocateUnits(const UnitRelocationBatch &batch)
Atomically relocate owned units; preserves orders and invalidates derived navigation routes....
Definition RTSRelocation.cpp:10
Unit * findUnit(SubjectRef subject) const noexcept
Resolve a module-owned unit by persistent subject identity.
Definition RTS.cpp:978
Definition RTS.cpp:30
@ InvalidArgument
@ NotFound
@ PreconditionViolation
@ Failed
@ Conflict
@ NoOp
@ Applied
Agent identity qualified by the Crowd instance that owns its registry. @ownership Value only; it neit...
Definition CrowdTypes.h:90
Atomic exact placement batch; rejects terrain/contact violations without pushing neighbors.
Definition Crowd.h:186
Caller-built atomic exact-placement request; Crowd-linked units must already be projected.
Definition RTSSystems.h:276