载入中...
搜索中...
未找到
PropertyAccess.cpp
浏览该文件的文档.
35 return rejected("property_access.property.arity", "Composite property has the wrong component count");
49 case PropertyKind::Number: compatible = type == Value::Type::Number || type == Value::Type::Integer; break;
64 if (!compatible) return rejected("property_access.property.type", "Property value type does not match schema");
bool ok() const noexcept
Whether this result represents a non-failure outcome.
Definition Result.h:286
@ String
@ Array
@ Object
@ Bool
Definition PropertyAccess.cpp:7
Result< void > validateArrayArity(PropertyKind kind, const Value::Array &items)
Definition PropertyAccess.cpp:25
Result< void > rejected(std::string rule, std::string message, DiagnosticCode code=DiagnosticCode::PreconditionViolation)
Build a rejected write/validation result with a stable rule string.
Definition PropertyAccess.h:107
Result< void > validateNumericComponent(const PropertyDescriptor &property, double number)
Definition PropertyAccess.cpp:16
constexpr bool hasFlag(PropertyFlag value, PropertyFlag flag)
True when flag.
Definition PropertyAccess.h:62
PropertyKind
Semantic property kind used by renderer-independent presenters.
Definition PropertyAccess.h:21
@ ReadOnlyText
std::optional< std::reference_wrapper< T > > OptionalRef
Optional borrowed reference; it does not extend T's lifetime.
Definition BorrowedRef.h:24
std::optional< double > minimum
Definition PropertyAccess.h:66
std::optional< double > maximum
Definition PropertyAccess.h:67
One stable property description consumed by any UI shell.
Definition PropertyAccess.h:74
NumericMetadata numeric
Definition PropertyAccess.h:82
std::vector< std::string > choices
Definition PropertyAccess.h:83
eve::OptionalRef< const PropertyDescriptor > find(const std::string &path) const
Find a property by stable path, or an empty immediate borrow.
Definition PropertyAccess.cpp:9
std::vector< PropertyDescriptor > properties
Definition PropertyAccess.h:91