2017-02-01 22:10:41 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <memory>
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
#import <React/RCTBridgeModule.h>
|
2017-04-07 16:27:08 +00:00
|
|
|
|
|
|
|
namespace facebook {
|
|
|
|
namespace xplat {
|
|
|
|
namespace module {
|
|
|
|
class CxxModule;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-02-01 22:10:41 +00:00
|
|
|
|
2017-03-17 13:55:43 +00:00
|
|
|
/**
|
|
|
|
* Subclass RCTCxxModule to use cross-platform CxxModule on iOS.
|
|
|
|
*
|
|
|
|
* Subclasses must implement the createModule method to lazily produce the module. When running under the Cxx bridge
|
|
|
|
* modules will be accessed directly, under the Objective-C bridge method access is wrapped through RCTCxxMethod.
|
|
|
|
*/
|
2017-02-01 22:10:41 +00:00
|
|
|
@interface RCTCxxModule : NSObject <RCTBridgeModule>
|
|
|
|
|
2017-03-17 13:55:43 +00:00
|
|
|
// To be implemented by subclasses
|
|
|
|
- (std::unique_ptr<facebook::xplat::module::CxxModule>)createModule;
|
2017-02-01 22:10:41 +00:00
|
|
|
|
|
|
|
@end
|