/** * 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 NativeSafeAreaContextCxxSpecJSI : public TurboModule { protected: NativeSafeAreaContextCxxSpecJSI(std::shared_ptr jsInvoker); public: virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; }; template class JSI_EXPORT NativeSafeAreaContextCxxSpec : 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 = "RNCSafeAreaContext"; protected: NativeSafeAreaContextCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSafeAreaContextCxxSpec::kModuleName}, jsInvoker), delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSafeAreaContextCxxSpecJSI { public: Delegate(T *instance, std::shared_ptr jsInvoker) : NativeSafeAreaContextCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { } jsi::Object getConstants(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::getConstants) == 1, "Expected getConstants(...) to have 1 parameters"); return bridging::callFromJs( rt, &T::getConstants, jsInvoker_, instance_); } private: friend class NativeSafeAreaContextCxxSpec; T *instance_; }; Delegate delegate_; }; } // namespace facebook::react