#pragma once #include #include #include #include #include "NativeReanimatedModule.h" #include "ShareableValue.h" using namespace facebook; namespace reanimated { class MapperRegistry; struct ViewDescriptor { int tag; jsi::Value name; }; class Mapper : public std::enable_shared_from_this { friend MapperRegistry; private: unsigned long id; NativeReanimatedModule *module; std::shared_ptr mapper; std::vector> inputs; std::vector> outputs; bool dirty = true; std::shared_ptr userUpdater; UpdaterFunction *updateProps; int optimalizationLvl = 0; std::shared_ptr viewDescriptors; public: Mapper( NativeReanimatedModule *module, unsigned long id, std::shared_ptr mapper, std::vector> inputs, std::vector> outputs); void execute(jsi::Runtime &rt); void enableFastMode( const int optimalizationLvl, const std::shared_ptr &updater, const std::shared_ptr &jsViewDescriptors); virtual ~Mapper(); }; } // namespace reanimated