/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GenerateModuleH.js */ #pragma once #include #include namespace facebook::react { class JSI_EXPORT NativeFastImageViewModuleCxxSpecJSI : public TurboModule { protected: NativeFastImageViewModuleCxxSpecJSI(std::shared_ptr jsInvoker); public: virtual void preload(jsi::Runtime &rt, jsi::Array sources) = 0; virtual jsi::Value clearMemoryCache(jsi::Runtime &rt) = 0; virtual jsi::Value clearDiskCache(jsi::Runtime &rt) = 0; }; template class JSI_EXPORT NativeFastImageViewModuleCxxSpec : public TurboModule { public: jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { return delegate_.create(rt, propName); } std::vector getPropertyNames(jsi::Runtime& runtime) override { return delegate_.getPropertyNames(runtime); } static constexpr std::string_view kModuleName = "FastImageViewModule"; protected: NativeFastImageViewModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeFastImageViewModuleCxxSpec::kModuleName}, jsInvoker), delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeFastImageViewModuleCxxSpecJSI { public: Delegate(T *instance, std::shared_ptr jsInvoker) : NativeFastImageViewModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { } void preload(jsi::Runtime &rt, jsi::Array sources) override { static_assert( bridging::getParameterCount(&T::preload) == 2, "Expected preload(...) to have 2 parameters"); return bridging::callFromJs( rt, &T::preload, jsInvoker_, instance_, std::move(sources)); } jsi::Value clearMemoryCache(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::clearMemoryCache) == 1, "Expected clearMemoryCache(...) to have 1 parameters"); return bridging::callFromJs( rt, &T::clearMemoryCache, jsInvoker_, instance_); } jsi::Value clearDiskCache(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::clearDiskCache) == 1, "Expected clearDiskCache(...) to have 1 parameters"); return bridging::callFromJs( rt, &T::clearDiskCache, jsInvoker_, instance_); } private: friend class NativeFastImageViewModuleCxxSpec; T *instance_; }; Delegate delegate_; }; } // namespace facebook::react