newsmemory-ios-sdk/Frameworks/RNReanimated.xcframework/ios-arm64/Headers/MapperRegistry.h

30 lines
563 B
C
Raw Normal View History

2024-10-29 07:36:43 +00:00
#pragma once
#include <jsi/jsi.h>
#include <memory>
#include <unordered_map>
#include <vector>
using namespace facebook;
namespace reanimated {
class Mapper;
class MapperRegistry {
std::unordered_map<unsigned long, std::shared_ptr<Mapper>> mappers;
std::vector<std::shared_ptr<Mapper>> sortedMappers;
void updateOrder();
bool updatedSinceLastExecute = false;
public:
void startMapper(std::shared_ptr<Mapper> mapper);
void stopMapper(unsigned long id);
void execute(jsi::Runtime &rt);
bool needRunOnRender();
};
} // namespace reanimated