Renderer- and transaction-independent MVVM property surface. 更多...
#include <PropertyAccess.h>
Public 类型 | |
| using | ChangeCallback = std::function< void(const PropertyChange &)> |
Public 成员函数 | |
| virtual | ~IPropertyAccess ()=default |
| I property access. | |
| virtual const PropertySchema & | schema () const =0 |
| Return the stable schema exposed by this model. | |
| virtual std::optional< Value > | read (const std::string &path) const =0 |
| Read a property value, or nullopt when it is absent. | |
| virtual WriteResult | write (const std::string &path, const Value &value)=0 |
| Request a two-way binding write. | |
| virtual std::uint64_t | revision () const =0 |
| Monotonic revision incremented after observable changes. | |
| virtual Subscription | subscribe (ChangeCallback callback)=0 |
| Observe changes until the returned token is destroyed. | |
详细描述
Renderer- and transaction-independent MVVM property surface.
Implementations may wrap gameplay state, reflected script objects, editor targets or remote automation. Writes express intent; the implementation decides whether to assign directly, dispatch a command, or reject it.
在文件 PropertyAccess.h 第 151 行定义.
成员类型定义说明
◆ ChangeCallback
| using eve::property_access::IPropertyAccess::ChangeCallback = std::function<void(const PropertyChange &)> |
在文件 PropertyAccess.h 第 153 行定义.
构造及析构函数说明
◆ ~IPropertyAccess()
|
virtualdefault |
I property access.
成员函数说明
◆ read()
|
pure virtual |
Read a property value, or nullopt when it is absent.
在 eve::editor::EditorPropertyModel , 以及 eve::property_access::ReflectedPropertyModel 内被实现.
◆ revision()
|
pure virtual |
Monotonic revision incremented after observable changes.
在 eve::editor::EditorPropertyModel , 以及 eve::property_access::ReflectedPropertyModel 内被实现.
◆ schema()
|
pure virtual |
Return the stable schema exposed by this model.
在 eve::editor::EditorPropertyModel , 以及 eve::property_access::ReflectedPropertyModel 内被实现.
◆ subscribe()
|
pure virtual |
Observe changes until the returned token is destroyed.
在 eve::editor::EditorPropertyModel , 以及 eve::property_access::ReflectedPropertyModel 内被实现.
◆ write()
|
pure virtual |
Request a two-way binding write.
在 eve::editor::EditorPropertyModel , 以及 eve::property_access::ReflectedPropertyModel 内被实现.
该类的文档由以下文件生成:
- src/modules/property_access/PropertyAccess.h