载入中...
搜索中...
未找到
#include "common/Assert.h"#include "common/Result.h"#include "editing/EditingIds.h"#include <string>#include <type_traits>#include <utility>#include <vector>命名空间 | |
| namespace | eve |
| Build metadata (engine git commit, build time, third-party version). | |
| namespace | eve::editing |
类型定义 | |
| using | eve::editing::Status = eve::StatusCode |
| using | eve::editing::DiagnosticSeverity = eve::Severity |
| using | eve::editing::Diagnostic = eve::Diagnostic |
| template<class T > | |
| using | eve::editing::Result = eve::Result< T > |
函数 | |
| Diagnostic | eve::editing::ruleDiagnostic (eve::DiagnosticCode code, RuleId rule, DiagnosticSeverity severity, std::string message) |
| Build a common diagnostic carrying an open editing rule identity. | |
| RuleId | eve::editing::diagnosticRule (const Diagnostic &diagnostic) |
| Return the projected editing rule, or an empty RuleId when absent. | |
| template<class T > | |
| Result< T > | eve::editing::applied (T value, std::vector< Diagnostic > diagnostics={}) |
| Construct an Applied result with an owning payload and optional diagnostics. | |
| template<class T = void> requires std::is_void_v<T> | |
| Result< void > | eve::editing::applied (std::vector< Diagnostic > diagnostics={}) |
| Construct an Applied void result with optional diagnostics. | |
| Result< void > | eve::editing::noOp (std::vector< Diagnostic > diagnostics={}) |
| Construct a successful void result for an operation that made no change. | |
| Result< void > | eve::editing::pending (std::vector< Diagnostic > diagnostics={}) |
| Construct a successful void result for accepted asynchronous work. | |
| template<class T > | |
| Result< T > | eve::editing::failed (Status status, eve::DiagnosticCode code, RuleId rule, std::string message) |
| Construct a failed editing result with explicit status and diagnostic categories. | |
| constexpr eve::DiagnosticCode | eve::editing::diagnosticCodeForStatus (Status status) noexcept |
| Coarse default diagnostic category for a failure status. | |
| template<class T > | |
| Result< T > | eve::editing::failed (Status status, RuleId rule, std::string message) |
| Migration convenience using the canonical coarse category for the failure status. | |
| template<class T > | |
| Result< T > | eve::editing::rejected (RuleId rule, std::string message, eve::DiagnosticCode code=eve::DiagnosticCode::PreconditionViolation) |
| Construct a Rejected result for invalid editing input or preconditions. | |
变量 | |
| constexpr const char * | eve::editing::kRuleDiagnosticDetail = "rule" |
| Reserved DiagnosticDetails key containing an editing RuleId projection. | |