mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Import folly and adjust whitespace to match old codegen
Summary: Import folly to handle optionals (`folly::Optional<__type__>`) Sort modules and indent generated code to match output from the old codegen. While not strictly necessary as these are generated files that should not be edited by hand, I found that matching the old codegen in this regard made it less of a chore when it came to comparing the output of both codebases. Changelog: [Internal] Reviewed By: RSNara Differential Revision: D21395231 fbshipit-source-id: 289d617d7a2d93724456c80afea57a49c108cb9b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
de7f69a58e
commit
e8060ae103
+23
-14
@@ -24,14 +24,15 @@ const {
|
||||
|
||||
type FilesOutput = Map<string, string>;
|
||||
|
||||
const moduleTemplate = `
|
||||
class JSI_EXPORT Native::_MODULE_NAME_::SpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
Native::_MODULE_NAME_::SpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};`;
|
||||
const moduleTemplate = ` /**
|
||||
* ObjC++ class for module '::_MODULE_NAME_::'
|
||||
*/
|
||||
class JSI_EXPORT Native::_MODULE_NAME_::SpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
Native::_MODULE_NAME_::SpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};`;
|
||||
|
||||
const protocolTemplate = `
|
||||
::_STRUCTS_::
|
||||
const protocolTemplate = `::_STRUCTS_::
|
||||
|
||||
@protocol Native::_MODULE_NAME_::Spec <RCTBridgeModule, RCTTurboModule>
|
||||
::_MODULE_PROPERTIES_::
|
||||
@@ -53,30 +54,36 @@ const template = `
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* ${'@'}generated by codegen project: GenerateModuleHObjCpp.js
|
||||
*/
|
||||
|
||||
// NOTE: This entire file should be codegen'ed.
|
||||
#ifndef __cplusplus
|
||||
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
||||
#endif
|
||||
|
||||
#import <vector>
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
#import <RCTRequired/RCTRequired.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <React/RCTCxxConvert.h>
|
||||
#import <React/RCTManagedPointer.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
|
||||
::_PROTOCOLS_::
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
namespace react {
|
||||
::_MODULES_::
|
||||
|
||||
} // namespace react
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
`;
|
||||
|
||||
@@ -184,6 +191,7 @@ module.exports = {
|
||||
moduleSpecName: string,
|
||||
): FilesOutput {
|
||||
const nativeModules = Object.keys(schema.modules)
|
||||
.sort()
|
||||
.map(moduleName => {
|
||||
const modules = schema.modules[moduleName].nativeModules;
|
||||
if (modules == null) {
|
||||
@@ -200,6 +208,7 @@ module.exports = {
|
||||
.join('\n');
|
||||
|
||||
const protocols = Object.keys(nativeModules)
|
||||
.sort()
|
||||
.map(name => {
|
||||
const objectForGeneratingStructs: Array<ObjectForGeneratingStructs> = [];
|
||||
const {properties} = nativeModules[name];
|
||||
|
||||
@@ -18,38 +18,38 @@ const {flatObjects} = require('./ObjCppUtils/Utils');
|
||||
type FilesOutput = Map<string, string>;
|
||||
|
||||
const propertyHeaderTemplate =
|
||||
'static facebook::jsi::Value __hostFunction_Native::_MODULE_NAME_::SpecJSI_::_PROPERTY_NAME_::(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {';
|
||||
' static facebook::jsi::Value __hostFunction_Native::_MODULE_NAME_::SpecJSI_::_PROPERTY_NAME_::(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {';
|
||||
|
||||
const propertyCastTemplate = `static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, ::_KIND_::, "::_PROPERTY_NAME_::", @selector(::_PROPERTY_NAME_::::_ARGS_::), args, count);`;
|
||||
|
||||
const propertyTemplate = `
|
||||
${propertyHeaderTemplate}
|
||||
return ${propertyCastTemplate}
|
||||
}`.trim();
|
||||
return ${propertyCastTemplate}
|
||||
}`;
|
||||
|
||||
const proprertyDefTemplate =
|
||||
' methodMap_["::_PROPERTY_NAME_::"] = MethodMetadata {::_ARGS_COUNT_::, __hostFunction_Native::_MODULE_NAME_::SpecJSI_::_PROPERTY_NAME_::};';
|
||||
const propertyDefTemplate =
|
||||
' methodMap_["::_PROPERTY_NAME_::"] = MethodMetadata {::_ARGS_COUNT_::, __hostFunction_Native::_MODULE_NAME_::SpecJSI_::_PROPERTY_NAME_::};';
|
||||
|
||||
const moduleTemplate = `
|
||||
::_TURBOMODULE_METHOD_INVOKERS_::
|
||||
::_TURBOMODULE_METHOD_INVOKERS_::
|
||||
|
||||
Native::_MODULE_NAME_::SpecJSI::Native::_MODULE_NAME_::SpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
::_PROPERTIES_MAP_::::_CONVERSION_SELECTORS_::
|
||||
}`.trim();
|
||||
Native::_MODULE_NAME_::SpecJSI::Native::_MODULE_NAME_::SpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
::_PROPERTIES_MAP_::::_CONVERSION_SELECTORS_::
|
||||
}`.trim();
|
||||
|
||||
const getterTemplate = `
|
||||
@implementation RCTCxxConvert (Native::_MODULE_NAME_::_Spec::_GETTER_NAME_::)
|
||||
@implementation RCTCxxConvert (Native::_MODULE_NAME_::_Spec::_GETTER_NAME_::)
|
||||
+ (RCTManagedPointer *)JS_Native::_MODULE_NAME_::_Spec::_GETTER_NAME_:::(id)json
|
||||
{
|
||||
return facebook::react::managedPointer<JS::Native::_MODULE_NAME_::::Spec::_GETTER_NAME_::>(json);
|
||||
}
|
||||
@end
|
||||
`.trim();
|
||||
`;
|
||||
|
||||
const argConvertionTemplate =
|
||||
'\n setMethodArgConversionSelector(@"::_ARG_NAME_::", ::_ARG_NUMBER_::, @"JS_Native::_MODULE_NAME_::_Spec::_SELECTOR_NAME_:::");';
|
||||
'\n setMethodArgConversionSelector(@"::_ARG_NAME_::", ::_ARG_NUMBER_::, @"JS_Native::_MODULE_NAME_::_Spec::_SELECTOR_NAME_:::");';
|
||||
|
||||
const template = `
|
||||
/**
|
||||
@@ -57,17 +57,18 @@ const template = `
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* ${'@'}generated by codegen project: GenerateModuleMm.js
|
||||
*/
|
||||
|
||||
#include <::_INCLUDE_::>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
::_GETTERS_::
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
namespace react {
|
||||
::_MODULES_::
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
`;
|
||||
|
||||
@@ -242,7 +243,7 @@ module.exports = {
|
||||
returnTypeAnnotation.properties &&
|
||||
returnTypeAnnotation.properties.length === 0
|
||||
? ''
|
||||
: proprertyDefTemplate
|
||||
: propertyDefTemplate
|
||||
.replace(/::_PROPERTY_NAME_::/g, propertyName)
|
||||
.replace(/::_ARGS_COUNT_::/g, params.length.toString()),
|
||||
)
|
||||
|
||||
+125
-88
@@ -8,23 +8,29 @@ Map {
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleHObjCpp.js
|
||||
*/
|
||||
|
||||
// NOTE: This entire file should be codegen'ed.
|
||||
#ifndef __cplusplus
|
||||
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
||||
#endif
|
||||
|
||||
#import <vector>
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
#import <RCTRequired/RCTRequired.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <React/RCTCxxConvert.h>
|
||||
#import <React/RCTManagedPointer.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
|
||||
|
||||
|
||||
@@ -154,14 +160,15 @@ inline NSString *JS::NativeSampleTurboModule::SpecDifficultAE::F() const
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
namespace react {
|
||||
/**
|
||||
* ObjC++ class for module 'SampleTurboModule'
|
||||
*/
|
||||
class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
@@ -175,23 +182,29 @@ Map {
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleHObjCpp.js
|
||||
*/
|
||||
|
||||
// NOTE: This entire file should be codegen'ed.
|
||||
#ifndef __cplusplus
|
||||
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
||||
#endif
|
||||
|
||||
#import <vector>
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
#import <RCTRequired/RCTRequired.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <React/RCTCxxConvert.h>
|
||||
#import <React/RCTManagedPointer.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
|
||||
|
||||
|
||||
@@ -203,14 +216,15 @@ Map {
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
namespace react {
|
||||
/**
|
||||
* ObjC++ class for module 'SampleTurboModule'
|
||||
*/
|
||||
class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
@@ -224,23 +238,29 @@ Map {
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleHObjCpp.js
|
||||
*/
|
||||
|
||||
// NOTE: This entire file should be codegen'ed.
|
||||
#ifndef __cplusplus
|
||||
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
||||
#endif
|
||||
|
||||
#import <vector>
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
#import <RCTRequired/RCTRequired.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <React/RCTCxxConvert.h>
|
||||
#import <React/RCTManagedPointer.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
|
||||
|
||||
|
||||
@@ -310,14 +330,15 @@ inline JS::NativeSampleTurboModule::Constants::Builder::Builder(Constants i) : _
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
namespace react {
|
||||
/**
|
||||
* ObjC++ class for module 'SampleTurboModule'
|
||||
*/
|
||||
class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
@@ -331,32 +352,29 @@ Map {
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleHObjCpp.js
|
||||
*/
|
||||
|
||||
// NOTE: This entire file should be codegen'ed.
|
||||
#ifndef __cplusplus
|
||||
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
||||
#endif
|
||||
|
||||
#import <vector>
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
#import <RCTRequired/RCTRequired.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <React/RCTCxxConvert.h>
|
||||
#import <React/RCTManagedPointer.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@protocol NativeSampleTurboModuleSpec <RCTBridgeModule, RCTTurboModule>
|
||||
- (void) voidFunc;
|
||||
@end
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
|
||||
|
||||
|
||||
@@ -368,20 +386,31 @@ Map {
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@protocol NativeSampleTurboModuleSpec <RCTBridgeModule, RCTTurboModule>
|
||||
- (void) voidFunc;
|
||||
@end
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
|
||||
class JSI_EXPORT NativeSample2TurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSample2TurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
namespace react {
|
||||
/**
|
||||
* ObjC++ class for module 'SampleTurboModule'
|
||||
*/
|
||||
class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
/**
|
||||
* ObjC++ class for module 'Sample2TurboModule'
|
||||
*/
|
||||
class JSI_EXPORT NativeSample2TurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSample2TurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
@@ -395,32 +424,29 @@ Map {
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleHObjCpp.js
|
||||
*/
|
||||
|
||||
// NOTE: This entire file should be codegen'ed.
|
||||
#ifndef __cplusplus
|
||||
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
||||
#endif
|
||||
|
||||
#import <vector>
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
#import <RCTRequired/RCTRequired.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <React/RCTCxxConvert.h>
|
||||
#import <React/RCTManagedPointer.h>
|
||||
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@protocol NativeSampleTurboModuleSpec <RCTBridgeModule, RCTTurboModule>
|
||||
- (void) voidFunc;
|
||||
@end
|
||||
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
|
||||
|
||||
|
||||
@@ -431,20 +457,31 @@ Map {
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@protocol NativeSampleTurboModuleSpec <RCTBridgeModule, RCTTurboModule>
|
||||
- (void) voidFunc;
|
||||
@end
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
|
||||
class JSI_EXPORT NativeSample2TurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSample2TurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
namespace react {
|
||||
/**
|
||||
* ObjC++ class for module 'SampleTurboModule'
|
||||
*/
|
||||
class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
/**
|
||||
* ObjC++ class for module 'Sample2TurboModule'
|
||||
*/
|
||||
class JSI_EXPORT NativeSample2TurboModuleSpecJSI : public ObjCTurboModule {
|
||||
public:
|
||||
NativeSample2TurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
||||
};
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
|
||||
+136
-109
@@ -8,43 +8,51 @@ Map {
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleMm.js
|
||||
*/
|
||||
|
||||
#include <SampleSpec/SampleSpec.h>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
|
||||
@implementation RCTCxxConvert (NativeSampleTurboModule_SpecDifficultReturnType)
|
||||
+ (RCTManagedPointer *)JS_NativeSampleTurboModule_SpecDifficultReturnType:(id)json
|
||||
{
|
||||
return facebook::react::managedPointer<JS::NativeSampleTurboModule::SpecDifficultReturnType>(json);
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation RCTCxxConvert (NativeSampleTurboModule_SpecDifficultA)
|
||||
+ (RCTManagedPointer *)JS_NativeSampleTurboModule_SpecDifficultA:(id)json
|
||||
{
|
||||
return facebook::react::managedPointer<JS::NativeSampleTurboModule::SpecDifficultA>(json);
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation RCTCxxConvert (NativeSampleTurboModule_SpecDifficultAE)
|
||||
+ (RCTManagedPointer *)JS_NativeSampleTurboModule_SpecDifficultAE:(id)json
|
||||
{
|
||||
return facebook::react::managedPointer<JS::NativeSampleTurboModule::SpecDifficultAE>(json);
|
||||
}
|
||||
@end
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
namespace react {
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_difficult(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_difficult(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, ObjectKind, \\"difficult\\", @selector(difficult:), args, count);
|
||||
}
|
||||
}
|
||||
|
||||
NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
methodMap_[\\"difficult\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_difficult};
|
||||
setMethodArgConversionSelector(@\\"difficult\\", 0, @\\"JS_NativeSampleTurboModule_SpecDifficultA:\\");
|
||||
}
|
||||
|
||||
|
||||
} // namespace react
|
||||
NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
methodMap_[\\"difficult\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_difficult};
|
||||
setMethodArgConversionSelector(@\\"difficult\\", 0, @\\"JS_NativeSampleTurboModule_SpecDifficultA:\\");
|
||||
}
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
@@ -58,22 +66,23 @@ Map {
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleMm.js
|
||||
*/
|
||||
|
||||
#include <SampleSpec/SampleSpec.h>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace react
|
||||
NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
|
||||
}
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
@@ -87,75 +96,87 @@ Map {
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleMm.js
|
||||
*/
|
||||
|
||||
#include <SampleSpec/SampleSpec.h>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
namespace react {
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, ObjectKind, \\"getConstants\\", @selector(getConstants), args, count);
|
||||
}
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count);
|
||||
}
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getBool(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getBool(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, BooleanKind, \\"getBool\\", @selector(getBool:), args, count);
|
||||
}
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getNumber(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getNumber(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, NumberKind, \\"getNumber\\", @selector(getNumber:), args, count);
|
||||
}
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getString(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getString(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, StringKind, \\"getString\\", @selector(getString:), args, count);
|
||||
}
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getArray(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getArray(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, ArrayKind, \\"getArray\\", @selector(getArray:), args, count);
|
||||
}
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getObject(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getObject(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, ObjectKind, \\"getObject\\", @selector(getObject:), args, count);
|
||||
}
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getRootTag(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getRootTag(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, NumberKind, \\"getRootTag\\", @selector(getRootTag:), args, count);
|
||||
}
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getValue(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getValue(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, ObjectKind, \\"getValue\\", @selector(getValue:y:z:), args, count);
|
||||
}
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getValueWithCallback(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getValueWithCallback(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, VoidKind, \\"getValueWithCallback\\", @selector(getValueWithCallback:), args, count);
|
||||
}
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getValueWithPromise(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getValueWithPromise(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, PromiseKind, \\"getValueWithPromise\\", @selector(getValueWithPromise:resolve:reject:), args, count);
|
||||
}
|
||||
}
|
||||
|
||||
NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
methodMap_[\\"getConstants\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_getConstants};
|
||||
methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc};
|
||||
methodMap_[\\"getBool\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getBool};
|
||||
methodMap_[\\"getNumber\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getNumber};
|
||||
methodMap_[\\"getString\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getString};
|
||||
methodMap_[\\"getArray\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getArray};
|
||||
methodMap_[\\"getObject\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getObject};
|
||||
methodMap_[\\"getRootTag\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getRootTag};
|
||||
methodMap_[\\"getValue\\"] = MethodMetadata {3, __hostFunction_NativeSampleTurboModuleSpecJSI_getValue};
|
||||
methodMap_[\\"getValueWithCallback\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getValueWithCallback};
|
||||
methodMap_[\\"getValueWithPromise\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getValueWithPromise};
|
||||
}
|
||||
|
||||
|
||||
} // namespace react
|
||||
NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
methodMap_[\\"getConstants\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_getConstants};
|
||||
methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc};
|
||||
methodMap_[\\"getBool\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getBool};
|
||||
methodMap_[\\"getNumber\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getNumber};
|
||||
methodMap_[\\"getString\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getString};
|
||||
methodMap_[\\"getArray\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getArray};
|
||||
methodMap_[\\"getObject\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getObject};
|
||||
methodMap_[\\"getRootTag\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getRootTag};
|
||||
methodMap_[\\"getValue\\"] = MethodMetadata {3, __hostFunction_NativeSampleTurboModuleSpecJSI_getValue};
|
||||
methodMap_[\\"getValueWithCallback\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getValueWithCallback};
|
||||
methodMap_[\\"getValueWithPromise\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_getValueWithPromise};
|
||||
}
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
@@ -169,37 +190,40 @@ Map {
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleMm.js
|
||||
*/
|
||||
|
||||
#include <SampleSpec/SampleSpec.h>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
namespace react {
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count);
|
||||
}
|
||||
}
|
||||
|
||||
NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc};
|
||||
}
|
||||
NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc};
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSample2TurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSample2TurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count);
|
||||
}
|
||||
}
|
||||
|
||||
NativeSample2TurboModuleSpecJSI::NativeSample2TurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
|
||||
methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSample2TurboModuleSpecJSI_voidFunc};
|
||||
}
|
||||
|
||||
|
||||
} // namespace react
|
||||
NativeSample2TurboModuleSpecJSI::NativeSample2TurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
|
||||
methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSample2TurboModuleSpecJSI_voidFunc};
|
||||
}
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
@@ -213,35 +237,38 @@ Map {
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleMm.js
|
||||
*/
|
||||
|
||||
#include <SampleSpec/SampleSpec.h>
|
||||
#import <folly/Optional.h>
|
||||
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
namespace react {
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count);
|
||||
}
|
||||
}
|
||||
|
||||
NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc};
|
||||
}
|
||||
static facebook::jsi::Value __hostFunction_NativeSample2TurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc};
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeSample2TurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule &>(turboModule)
|
||||
.invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count);
|
||||
}
|
||||
}
|
||||
|
||||
NativeSample2TurboModuleSpecJSI::NativeSample2TurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSample2TurboModuleSpecJSI_voidFunc};
|
||||
}
|
||||
|
||||
|
||||
} // namespace react
|
||||
NativeSample2TurboModuleSpecJSI::NativeSample2TurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSample2TurboModuleSpecJSI_voidFunc};
|
||||
}
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user