#pragma once #include #include #include "FrozenObject.h" #include "JSIStoreValueUser.h" #include "SharedParent.h" using namespace facebook; namespace reanimated { class RemoteObject : public jsi::HostObject, public StoreUser { private: std::weak_ptr backing; std::unique_ptr initializer; public: void maybeInitializeOnWorkletRuntime(jsi::Runtime &rt); RemoteObject( jsi::Runtime &rt, const jsi::Object &object, RuntimeManager *runtimeManager, std::shared_ptr s) : StoreUser(s, *runtimeManager), initializer( std::make_unique(rt, object, runtimeManager)) {} void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &name); std::vector getPropertyNames(jsi::Runtime &rt); }; } // namespace reanimated