mirror of
https://github.com/status-im/react-native.git
synced 2025-01-22 23:41:49 +00:00
1aeb767a37
Differential Revision: D5850970 fbshipit-source-id: 88ab6fe3822f1bc4195007f8ec83177a84c27569
27 lines
673 B
C++
27 lines
673 B
C++
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include <cxxreact/RAMBundleRegistry.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
class JSIndexedRAMBundleRegistry: public RAMBundleRegistry {
|
|
public:
|
|
JSIndexedRAMBundleRegistry(
|
|
std::unique_ptr<JSModulesUnbundle> mainBundle,
|
|
std::string baseDirectoryPath):
|
|
RAMBundleRegistry(std::move(mainBundle)), m_baseDirectoryPath(baseDirectoryPath) {}
|
|
|
|
protected:
|
|
virtual std::unique_ptr<JSModulesUnbundle> bundleById(uint32_t index) const override;
|
|
private:
|
|
std::string bundlePathById(uint32_t index) const;
|
|
|
|
std::string m_baseDirectoryPath;
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|