载入中...
搜索中...
未找到
eve::property_access::ReflectedPropertyModel类 参考final

Adapts one live Squirrel instance to the renderer-independent property model. 更多...

#include <ReflectedPropertyModel.h>

类 eve::property_access::ReflectedPropertyModel 继承关系图:
eve::property_access::IPropertyAccess

类

struct  ObserverState
 

Public 成员函数

 ReflectedPropertyModel (Runtime &runtime, ssq::Object instance)
 Bind one live script instance to the shared property-access contract.
 
 ~ReflectedPropertyModel () override
 Reflected property model.
 
 ReflectedPropertyModel (const ReflectedPropertyModel &)=delete
 
ReflectedPropertyModel & operator= (const ReflectedPropertyModel &)=delete
 
const PropertySchema & schema () const override
 Schema.
 
std::optional< eve::Value > read (const std::string &path) const override
 Reads .
 
WriteResult write (const std::string &path, const eve::Value &value) override
 Writes .
 
std::uint64_t revision () const override
 Revision.
 
Subscription subscribe (ChangeCallback callback) override
 Subscribe.
 
void rebuildSchema ()
 Rebuild reflection metadata after a script reload.
 
void refresh ()
 Pull live values and notify observers for changed properties.
 
- Public 成员函数 继承自 eve::property_access::IPropertyAccess
virtual ~IPropertyAccess ()=default
 I property access.
 

额外继承的成员函数

- Public 类型 继承自 eve::property_access::IPropertyAccess
using ChangeCallback = std::function< void(const PropertyChange &)>
 

详细描述

Adapts one live Squirrel instance to the renderer-independent property model.

Reflection metadata defines the schema while Runtime owns all reads and writes. Scalars, enums, Color/Vec composites (editor="color"|"vec2"|"vec3"|"vec4"), arrays and tables are editable through write(). Nested instances stay ObjectRef as a class-name string and remain read-only; hosts navigate them separately.

This adapter is compiled with property_access but is not part of the L0 contract: PropertyAccess.h stays free of the script runtime. Include this header only from script-aware hosts such as the Inspector.

在文件 ReflectedPropertyModel.h 第 25 行定义.

构造及析构函数说明

◆ ReflectedPropertyModel() [1/2]

eve::property_access::ReflectedPropertyModel::ReflectedPropertyModel ( Runtime &  runtime,
ssq::Object  instance 
)

Bind one live script instance to the shared property-access contract.

参数
runtimeBorrowed Runtime that performs reflection reads and writes.
instanceLive Squirrel instance retained by this model. @ownership Does not own runtime; retains instance for the model lifetime. @lifetime runtime must outlive this model; do not keep the model across Runtime stop/unload. instance stays rooted until destruction. @thread Call on the UI/script thread that owns the Runtime. @reentrancy Construction reads reflection metadata; do not invoke unknown callbacks while constructing.

在文件 ReflectedPropertyModel.cpp 第 147 行定义.

引用了 rebuildSchema() , 以及 refresh().

◆ ~ReflectedPropertyModel()

eve::property_access::ReflectedPropertyModel::~ReflectedPropertyModel ( )
overridedefault

Reflected property model.

◆ ReflectedPropertyModel() [2/2]

eve::property_access::ReflectedPropertyModel::ReflectedPropertyModel ( const ReflectedPropertyModel &  )
delete

成员函数说明

◆ operator=()

ReflectedPropertyModel & eve::property_access::ReflectedPropertyModel::operator= ( const ReflectedPropertyModel &  )
delete

◆ read()

std::optional< Value > eve::property_access::ReflectedPropertyModel::read ( const std::string &  path) const
overridevirtual

◆ rebuildSchema()

void eve::property_access::ReflectedPropertyModel::rebuildSchema ( )

◆ refresh()

void eve::property_access::ReflectedPropertyModel::refresh ( )

Pull live values and notify observers for changed properties.

在文件 ReflectedPropertyModel.cpp 第 301 行定义.

引用了 current, descriptor, found, eve::property_access::PropertySchema::properties , 以及 read().

被这些函数引用 ReflectedPropertyModel().

◆ revision()

std::uint64_t eve::property_access::ReflectedPropertyModel::revision ( ) const
inlineoverridevirtual

Revision.

实现了 eve::property_access::IPropertyAccess.

在文件 ReflectedPropertyModel.h 第 51 行定义.

◆ schema()

const PropertySchema & eve::property_access::ReflectedPropertyModel::schema ( ) const
inlineoverridevirtual

Schema.

实现了 eve::property_access::IPropertyAccess.

在文件 ReflectedPropertyModel.h 第 45 行定义.

◆ subscribe()

Subscription eve::property_access::ReflectedPropertyModel::subscribe ( ChangeCallback  callback)
overridevirtual

Subscribe.

实现了 eve::property_access::IPropertyAccess.

在文件 ReflectedPropertyModel.cpp 第 291 行定义.

引用了 callback, id , 以及 state.

◆ write()


该类的文档由以下文件生成: