类 | |
| class | IPropertyAccess |
| Renderer- and transaction-independent MVVM property surface. 更多... | |
| struct | NumericMetadata |
| Numeric editing metadata independent of a slider or spin-box widget. 更多... | |
| struct | PropertyChange |
| Immutable notification emitted after a model property changes. 更多... | |
| struct | PropertyDescriptor |
| One stable property description consumed by any UI shell. 更多... | |
| struct | PropertySchema |
| Versioned schema for one view model or editable target. 更多... | |
| class | ReflectedPropertyModel |
| Adapts one live Squirrel instance to the renderer-independent property model. 更多... | |
类型定义 | |
| using | Subscription = eve::Subscription |
| Compatibility alias for the common observer lifetime token. | |
枚举 | |
| enum class | PropertyKind { Auto , Bool , Integer , Number , String , Enum , Color , Vec2 , Vec3 , Vec4 , AssetRef , ObjectRef , Struct , Array , Map , Action , ReadOnlyText } |
| Semantic property kind used by renderer-independent presenters. 更多... | |
| enum class | PropertyFlag : std::uint64_t { None = 0 , ReadOnly = 1ull << 0 , Advanced = 1ull << 1 , EditorOnly = 1ull << 2 , Runtime = 1ull << 3 , Transient = 1ull << 4 , Dangerous = 1ull << 5 , MultiEdit = 1ull << 6 } |
| Cross-host property visibility and editing flags. 更多... | |
| enum class | PropertyChangeState { Value , Mixed , Missing } |
| Availability of a property in an immutable model snapshot. 更多... | |
函数 | |
| Result< void > | validateNumericComponent (const PropertyDescriptor &property, double number) |
| Result< void > | validateArrayArity (PropertyKind kind, const Value::Array &items) |
| Result< void > | validatePropertyValue (const PropertyDescriptor &property, const Value &value) |
| Validate one candidate value against the shared property contract. | |
| constexpr PropertyFlag | operator| (PropertyFlag left, PropertyFlag right) |
| Operator |. | |
| constexpr PropertyFlag | operator& (PropertyFlag left, PropertyFlag right) |
| Operator &. | |
| constexpr bool | hasFlag (PropertyFlag value, PropertyFlag flag) |
| True when flag. | |
| Result< void > | rejected (std::string rule, std::string message, DiagnosticCode code=DiagnosticCode::PreconditionViolation) |
| Build a rejected write/validation result with a stable rule string. | |
| Result< void > | accepted () |
| Build a successful write/validation result. | |
| std::string_view | diagnosticRule (const Diagnostic &diagnostic) |
| Return the projected property-access rule id, or empty when absent. | |
| std::string | writeRule (const Result< void > &result) |
| Return the primary rule id from a write/validation result. | |
变量 | |
| constexpr const char * | kRuleDiagnosticDetail = "rule" |
| Reserved DiagnosticDetails key carrying a stable property-access rule id. | |
类型定义说明
◆ Subscription
| using eve::property_access::Subscription = typedef eve::Subscription |
Compatibility alias for the common observer lifetime token.
The common eve::Subscription owns the only cancellation lifecycle. This alias preserves the property-access API without maintaining a second token implementation.
在文件 PropertyAccess.h 第 174 行定义.
枚举类型说明
◆ PropertyChangeState
|
strong |
Availability of a property in an immutable model snapshot.
| 枚举值 | |
|---|---|
| Value | |
| Mixed | |
| Missing | |
在文件 PropertyAccess.h 第 157 行定义.
◆ PropertyFlag
|
strong |
Cross-host property visibility and editing flags.
| 枚举值 | |
|---|---|
| None | |
| ReadOnly | |
| Advanced | |
| EditorOnly | |
| Runtime | |
| Transient | |
| Dangerous | |
| MultiEdit | |
在文件 PropertyAccess.h 第 42 行定义.
◆ PropertyKind
|
strong |
Semantic property kind used by renderer-independent presenters.
| 枚举值 | |
|---|---|
| Auto | |
| Bool | |
| Integer | |
| Number | |
| String | |
| Enum | |
| Color | |
| Vec2 | |
| Vec3 | |
| Vec4 | |
| AssetRef | |
| ObjectRef | |
| Struct | |
| Array | |
| Map | |
| Action | |
| ReadOnlyText | |
在文件 PropertyAccess.h 第 21 行定义.
函数说明
◆ accepted()
|
inline |
Build a successful write/validation result.
- 返回
- Successful
Result<void>withStatusCode::Ok.
在文件 PropertyAccess.h 第 119 行定义.
引用了 eve::Result< T >::success().
被这些函数引用 validateArrayArity(), validateNumericComponent(), validatePropertyValue(), eve::editor::EditorPropertyModel::write() , 以及 eve::property_access::ReflectedPropertyModel::write().
◆ diagnosticRule()
|
inline |
Return the projected property-access rule id, or empty when absent.
- 参数
-
diagnostic Structured diagnostic that may carry a ruledetail.
在文件 PropertyAccess.h 第 125 行定义.
引用了 eve::Diagnostic::details(), key, kRuleDiagnosticDetail , 以及 value.
被这些函数引用 writeRule().
◆ hasFlag()
|
constexpr |
True when flag.
在文件 PropertyAccess.h 第 62 行定义.
引用了 value.
被这些函数引用 eve::ui::UI::propertySchema() , 以及 validatePropertyValue().
◆ operator&()
|
constexpr |
◆ operator|()
|
constexpr |
◆ rejected()
|
inline |
Build a rejected write/validation result with a stable rule string.
- 参数
-
rule Stable machine-readable rule id (for example property_access.property.type).message Human-readable explanation. code Coarse diagnostic category; defaults to precondition violation.
- 返回
- Failed
Result<void>withStatusCode::Rejected.
在文件 PropertyAccess.h 第 107 行定义.
引用了 code, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Status::failure(), kRuleDiagnosticDetail, message , 以及 eve::Rejected.
被这些函数引用 validateArrayArity(), validateNumericComponent(), validatePropertyValue(), eve::editor::EditorPropertyModel::write() , 以及 eve::property_access::ReflectedPropertyModel::write().
◆ validateArrayArity()
| Result< void > eve::property_access::validateArrayArity | ( | PropertyKind | kind, |
| const Value::Array & | items | ||
| ) |
在文件 PropertyAccess.cpp 第 25 行定义.
引用了 accepted(), Color, kind, rejected(), Vec2, Vec3 , 以及 Vec4.
被这些函数引用 validatePropertyValue().
◆ validateNumericComponent()
| Result< void > eve::property_access::validateNumericComponent | ( | const PropertyDescriptor & | property, |
| double | number | ||
| ) |
◆ validatePropertyValue()
| EVENGINE_API_FOUNDATION Result< void > eve::property_access::validatePropertyValue | ( | const PropertyDescriptor & | property, |
| const Value & | value | ||
| ) |
Validate one candidate value against the shared property contract.
- 参数
-
property Property kind, flags, choices and numeric constraints. value Candidate value. Floating-point values must be finite.
This is the single semantic validation entry point for property-access property adapters. Host-specific adapters may translate its diagnostics, but must not reimplement kind, enum, finite, arity or numeric-range validation.
Color requires an Array of 4 numeric components; Vec2/Vec3/Vec4 require 2/3/4. Rejected composites use property_access.property.arity when the length is wrong.
在文件 PropertyAccess.cpp 第 39 行定义.
引用了 accepted(), Action, eve::Value::Array, Array, AssetRef, Auto, eve::Value::Bool, Bool, eve::property_access::PropertyDescriptor::choices, Color, Enum, eve::property_access::PropertyDescriptor::flags, hasFlag(), eve::Value::Integer, Integer, eve::property_access::PropertyDescriptor::kind, Map, eve::Value::Number, Number, number, eve::Value::Object, ObjectRef, eve::Result< T >::ok(), ReadOnly, ReadOnlyText, rejected(), selected, eve::Value::String, String, Struct, type, validateArrayArity(), validateNumericComponent(), value, Vec2, Vec3 , 以及 Vec4.
◆ writeRule()
|
inline |
Return the primary rule id from a write/validation result.
- 参数
-
result Observed property-access Result; success yields an empty string.
在文件 PropertyAccess.h 第 135 行定义.
引用了 diagnosticRule(), error, eve::Diagnostic::error() , 以及 result.
变量说明
◆ kRuleDiagnosticDetail
|
inlineconstexpr |
Reserved DiagnosticDetails key carrying a stable property-access rule id.
在文件 PropertyAccess.h 第 98 行定义.
被这些函数引用 diagnosticRule() , 以及 rejected().