@react-native-ohos/react-native-mmkv 3.3.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1114) hide show
  1. package/MMKV/Core/CMakeLists.txt +172 -0
  2. package/MMKV/Core/CodedInputData.cpp +252 -0
  3. package/MMKV/Core/CodedInputData.h +87 -0
  4. package/MMKV/Core/CodedInputDataCrypt.cpp +280 -0
  5. package/MMKV/Core/CodedInputDataCrypt.h +87 -0
  6. package/MMKV/Core/CodedInputDataCrypt_OSX.cpp +62 -0
  7. package/MMKV/Core/CodedInputData_OSX.cpp +92 -0
  8. package/MMKV/Core/CodedOutputData.cpp +186 -0
  9. package/MMKV/Core/CodedOutputData.h +88 -0
  10. package/MMKV/Core/Core.xcodeproj/project.pbxproj +707 -0
  11. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  12. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  13. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +67 -0
  14. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +67 -0
  15. package/MMKV/Core/InterProcessLock.cpp +186 -0
  16. package/MMKV/Core/InterProcessLock.h +119 -0
  17. package/MMKV/Core/InterProcessLock_Android.cpp +103 -0
  18. package/MMKV/Core/InterProcessLock_Win32.cpp +108 -0
  19. package/MMKV/Core/KeyValueHolder.cpp +236 -0
  20. package/MMKV/Core/KeyValueHolder.h +122 -0
  21. package/MMKV/Core/MMBuffer.cpp +210 -0
  22. package/MMKV/Core/MMBuffer.h +111 -0
  23. package/MMKV/Core/MMKV.cpp +1702 -0
  24. package/MMKV/Core/MMKV.h +595 -0
  25. package/MMKV/Core/MMKVLog.cpp +127 -0
  26. package/MMKV/Core/MMKVLog.h +86 -0
  27. package/MMKV/Core/MMKVLog_Android.cpp +134 -0
  28. package/MMKV/Core/MMKVMetaInfo.hpp +99 -0
  29. package/MMKV/Core/MMKVPredef.h +293 -0
  30. package/MMKV/Core/MMKV_Android.cpp +261 -0
  31. package/MMKV/Core/MMKV_IO.cpp +1905 -0
  32. package/MMKV/Core/MMKV_IO.h +57 -0
  33. package/MMKV/Core/MMKV_OSX.cpp +423 -0
  34. package/MMKV/Core/MMKV_OSX.h +57 -0
  35. package/MMKV/Core/MemoryFile.cpp +603 -0
  36. package/MMKV/Core/MemoryFile.h +194 -0
  37. package/MMKV/Core/MemoryFile_Android.cpp +236 -0
  38. package/MMKV/Core/MemoryFile_Linux.cpp +125 -0
  39. package/MMKV/Core/MemoryFile_OSX.cpp +142 -0
  40. package/MMKV/Core/MemoryFile_Win32.cpp +554 -0
  41. package/MMKV/Core/MiniPBCoder.cpp +672 -0
  42. package/MMKV/Core/MiniPBCoder.h +151 -0
  43. package/MMKV/Core/MiniPBCoder_OSX.cpp +237 -0
  44. package/MMKV/Core/PBEncodeItem.hpp +104 -0
  45. package/MMKV/Core/PBUtility.cpp +61 -0
  46. package/MMKV/Core/PBUtility.h +148 -0
  47. package/MMKV/Core/ScopedLock.hpp +69 -0
  48. package/MMKV/Core/ThreadLock.cpp +75 -0
  49. package/MMKV/Core/ThreadLock.h +81 -0
  50. package/MMKV/Core/ThreadLock_Win32.cpp +89 -0
  51. package/MMKV/Core/aes/AESCrypt.cpp +273 -0
  52. package/MMKV/Core/aes/AESCrypt.h +112 -0
  53. package/MMKV/Core/aes/openssl/openssl_aes-armv4.S +1243 -0
  54. package/MMKV/Core/aes/openssl/openssl_aes.h +130 -0
  55. package/MMKV/Core/aes/openssl/openssl_aes_core.cpp +1044 -0
  56. package/MMKV/Core/aes/openssl/openssl_aes_locl.h +38 -0
  57. package/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +308 -0
  58. package/MMKV/Core/aes/openssl/openssl_arm_arch.h +84 -0
  59. package/MMKV/Core/aes/openssl/openssl_cfb128.cpp +97 -0
  60. package/MMKV/Core/aes/openssl/openssl_md32_common.h +254 -0
  61. package/MMKV/Core/aes/openssl/openssl_md5.h +49 -0
  62. package/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +166 -0
  63. package/MMKV/Core/aes/openssl/openssl_md5_locl.h +75 -0
  64. package/MMKV/Core/aes/openssl/openssl_md5_one.cpp +30 -0
  65. package/MMKV/Core/aes/openssl/openssl_opensslconf.h +271 -0
  66. package/MMKV/Core/core.vcxproj +288 -0
  67. package/MMKV/Core/core.vcxproj.filters +150 -0
  68. package/MMKV/Core/crc32/Checksum.h +75 -0
  69. package/MMKV/Core/crc32/crc32_armv8.cpp +134 -0
  70. package/MMKV/Core/crc32/zlib/CMakeLists.txt +60 -0
  71. package/MMKV/Core/crc32/zlib/crc32.cpp +55 -0
  72. package/MMKV/Core/crc32/zlib/crc32.h +48 -0
  73. package/MMKV/Core/crc32/zlib/zconf.h +380 -0
  74. package/MMKV/Core/crc32/zlib/zutil.h +25 -0
  75. package/MMKV/README.md +354 -0
  76. package/README.md +5 -0
  77. package/cpp/MMKVManagedBuffer.h +32 -0
  78. package/cpp/MmkvHostObject.cpp +355 -0
  79. package/cpp/MmkvHostObject.h +32 -0
  80. package/cpp/MmkvLogger.h +35 -0
  81. package/cpp/NativeMmkvModule.cpp +43 -0
  82. package/cpp/NativeMmkvModule.h +38 -0
  83. package/harmony/reactNativeMMKV/BuildProfile.ets +17 -0
  84. package/harmony/reactNativeMMKV/LICENSE +20 -0
  85. package/harmony/reactNativeMMKV/NOTICE +34 -0
  86. package/harmony/reactNativeMMKV/README.OpenSource +11 -0
  87. package/harmony/reactNativeMMKV/build-profile.json5 +9 -0
  88. package/harmony/reactNativeMMKV/hvigorfile.ts +6 -0
  89. package/harmony/reactNativeMMKV/index.ets +24 -0
  90. package/harmony/reactNativeMMKV/oh-package.json5 +15 -0
  91. package/harmony/reactNativeMMKV/src/main/cpp/CMakeLists.txt +15 -0
  92. package/harmony/reactNativeMMKV/src/main/cpp/ComponentDescriptors.h +39 -0
  93. package/harmony/reactNativeMMKV/src/main/cpp/EventEmitters.cpp +41 -0
  94. package/harmony/reactNativeMMKV/src/main/cpp/EventEmitters.h +182 -0
  95. package/harmony/reactNativeMMKV/src/main/cpp/HarmonyLogger.cpp +32 -0
  96. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.clang-format +36 -0
  97. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.dockerignore +2 -0
  98. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.github/FUNDING.yml +14 -0
  99. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.github/ISSUE_TEMPLATE/bug_report.md +45 -0
  100. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.gitmodules +3 -0
  101. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/build.gradle +54 -0
  102. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/checkstyle.xml +156 -0
  103. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/debug.keystore +0 -0
  104. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/android-publish-private.gradle +207 -0
  105. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/android-publish.gradle +276 -0
  106. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/build_library.gradle +62 -0
  107. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/check.gradle +76 -0
  108. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/wrapper/gradle-wrapper.jar +0 -0
  109. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/wrapper/gradle-wrapper.properties +6 -0
  110. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle.properties +25 -0
  111. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradlew +172 -0
  112. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradlew.bat +84 -0
  113. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/CMakeLists.txt +56 -0
  114. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/build.gradle +238 -0
  115. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/gradle.properties +2 -0
  116. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/proguard-rules.pro +9 -0
  117. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/AndroidManifest.xml +11 -0
  118. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/java/com/tencent/mmkv/MMKVTest.java +270 -0
  119. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/java/com/tencent/mmkv/MMKVTestService.java +79 -0
  120. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/AndroidManifest.xml +3 -0
  121. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/aidl/com/tencent/mmkv/ParcelableMMKV.aidl +4 -0
  122. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/cpp/flutter-bridge.cpp +706 -0
  123. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/cpp/native-bridge.cpp +1244 -0
  124. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKV.java +2024 -0
  125. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVContentChangeNotification.java +34 -0
  126. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVContentProvider.java +174 -0
  127. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVHandler.java +63 -0
  128. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVLogLevel.java +52 -0
  129. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVProcessUtil.java +100 -0
  130. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVRecoverStrategic.java +36 -0
  131. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/NameSpace.java +214 -0
  132. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/NativeBuffer.java +36 -0
  133. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/ParcelableMMKV.java +108 -0
  134. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/UnsupportedArchitectureException.java +27 -0
  135. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/build.gradle +34 -0
  136. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/src/main/AndroidManifest.xml +3 -0
  137. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/src/main/java/dalvik/annotation/optimization/FastNative.java +104 -0
  138. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/build.gradle +116 -0
  139. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/proguard-rules.pro +24 -0
  140. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/AndroidManifest.xml +54 -0
  141. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/aidl/com/tencent/mmkvdemo/IAshmemMMKV.aidl +8 -0
  142. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/cpp/CMakeLists.txt +50 -0
  143. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/cpp/mmkvdemo.cpp +245 -0
  144. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/Baseline.java +297 -0
  145. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/BenchMarkBaseService.java +363 -0
  146. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/FakeInfo.java +67 -0
  147. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/Info.java +69 -0
  148. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MainActivity.java +1029 -0
  149. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MultiProcessSharedPreferences.java +710 -0
  150. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyApplication.java +130 -0
  151. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyService.java +105 -0
  152. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyService_1.java +92 -0
  153. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/SQLiteKV.java +143 -0
  154. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/TestParcelable.java +70 -0
  155. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/kotlin/KotlinUsecase.kt +67 -0
  156. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/drawable/ic_launcher_background.xml +170 -0
  157. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
  158. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/layout/activity_main.xml +76 -0
  159. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
  160. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
  161. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  162. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  163. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  164. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  165. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  166. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  167. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  168. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  169. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  170. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  171. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/colors.xml +6 -0
  172. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/strings.xml +3 -0
  173. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/styles.xml +11 -0
  174. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/pmd-ruleset.xml +44 -0
  175. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/proguard-rules/proguard-rules-android-lib.pro +54 -0
  176. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/proguard-rules/proguard-rules-test.pro +6 -0
  177. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/settings.gradle +3 -0
  178. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CHANGELOG.md +979 -0
  179. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CODE_OF_CONDUCT.md +76 -0
  180. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CONTRIBUTING.md +61 -0
  181. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CMakeLists.txt +207 -0
  182. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData.cpp +248 -0
  183. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData.h +86 -0
  184. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt.cpp +276 -0
  185. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt.h +86 -0
  186. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt_OSX.cpp +62 -0
  187. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData_OSX.cpp +92 -0
  188. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedOutputData.cpp +182 -0
  189. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedOutputData.h +86 -0
  190. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.pbxproj +703 -0
  191. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  192. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  193. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +67 -0
  194. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +67 -0
  195. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock.cpp +211 -0
  196. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock.h +124 -0
  197. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock_Android.cpp +104 -0
  198. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock_Win32.cpp +108 -0
  199. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/KeyValueHolder.cpp +237 -0
  200. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/KeyValueHolder.h +122 -0
  201. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMBuffer.cpp +207 -0
  202. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMBuffer.h +119 -0
  203. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV.cpp +1791 -0
  204. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV.h +781 -0
  205. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog.cpp +127 -0
  206. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog.h +86 -0
  207. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog_Android.cpp +134 -0
  208. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVMetaInfo.hpp +99 -0
  209. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVPredef.h +310 -0
  210. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_Android.cpp +365 -0
  211. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_IO.cpp +2049 -0
  212. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_IO.h +85 -0
  213. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_OSX.cpp +589 -0
  214. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_OSX.h +30 -0
  215. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile.cpp +716 -0
  216. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile.h +212 -0
  217. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Android.cpp +247 -0
  218. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Linux.cpp +126 -0
  219. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_OSX.cpp +173 -0
  220. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Win32.cpp +655 -0
  221. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder.cpp +668 -0
  222. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder.h +150 -0
  223. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder_OSX.cpp +237 -0
  224. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBEncodeItem.hpp +102 -0
  225. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBUtility.cpp +61 -0
  226. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBUtility.h +148 -0
  227. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ScopedLock.hpp +69 -0
  228. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock.cpp +75 -0
  229. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock.h +81 -0
  230. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock_Win32.cpp +89 -0
  231. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/AESCrypt.cpp +293 -0
  232. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/AESCrypt.h +117 -0
  233. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes.h +98 -0
  234. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes_core.cpp +1044 -0
  235. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes_locl.h +38 -0
  236. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +308 -0
  237. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_arm_arch.h +84 -0
  238. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_cfb128.cpp +97 -0
  239. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md32_common.h +254 -0
  240. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5.h +49 -0
  241. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +166 -0
  242. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_locl.h +75 -0
  243. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_one.cpp +30 -0
  244. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_opensslconf.h +271 -0
  245. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/core.vcxproj +288 -0
  246. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/core.vcxproj.filters +150 -0
  247. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/CMakeLists.txt +60 -0
  248. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/Checksum.h +76 -0
  249. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/crc32_armv8.cpp +134 -0
  250. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/crc32.cpp +55 -0
  251. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/crc32.h +48 -0
  252. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/zconf.h +380 -0
  253. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/zutil.h +25 -0
  254. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Dockerfile +25 -0
  255. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/LICENSE.TXT +193 -0
  256. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.podspec +40 -0
  257. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.xcworkspace/contents.xcworkspacedata +10 -0
  258. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  259. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVAppExtension.podspec +37 -0
  260. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVCore.podspec +47 -0
  261. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVWatchExtension.podspec +38 -0
  262. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Makefile +10 -0
  263. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/app.json5 +10 -0
  264. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/resources/base/element/string.json +8 -0
  265. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/resources/base/media/app_icon.png +0 -0
  266. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/BuildProfile.ets +17 -0
  267. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/CHANGELOG.md +75 -0
  268. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/Index.ets +4 -0
  269. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/LICENSE +193 -0
  270. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/README.md +208 -0
  271. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/build-profile.json5 +40 -0
  272. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/consumer-rules.txt +61 -0
  273. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/example/Index.ets +686 -0
  274. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/example/Util.ets +31 -0
  275. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/hvigorfile.ts +6 -0
  276. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/obfuscation-rules.txt +18 -0
  277. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/oh-package.json5 +22 -0
  278. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/CMakeLists.txt +43 -0
  279. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/flutter-bridge.cpp +703 -0
  280. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/native_bridge.cpp +1840 -0
  281. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/types/libmmkv/index.d.ts +80 -0
  282. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/types/libmmkv/oh-package.json5 +6 -0
  283. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKV.ets +1073 -0
  284. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKVHandler.ets +111 -0
  285. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKVLogLevel.ets +50 -0
  286. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/NativeBuffer.ets +34 -0
  287. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/Util.ts +24 -0
  288. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/module.json5 +12 -0
  289. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/build-profile.json5 +62 -0
  290. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/dependencies/hvigor-4.3.0.tgz +0 -0
  291. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/dependencies/hvigor-ohos-plugin-4.3.0.tgz +0 -0
  292. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/build-profile.json5 +39 -0
  293. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/hvigorfile.ts +6 -0
  294. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/obfuscation-rules.txt +25 -0
  295. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/oh-package.json5 +13 -0
  296. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/CMakeLists.txt +54 -0
  297. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/napi_init.cpp +233 -0
  298. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/types/libentry/index.d.ts +1 -0
  299. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/types/libentry/oh-package.json5 +6 -0
  300. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/Baseline.ets +188 -0
  301. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/MyMMKVHandler.ets +76 -0
  302. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/Util.ets +220 -0
  303. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/entryability/EntryAbility.ets +107 -0
  304. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/pages/Index.ets +766 -0
  305. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/process/DemoProcess.ets +31 -0
  306. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/module.json5 +38 -0
  307. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/element/color.json +8 -0
  308. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/element/string.json +16 -0
  309. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/background.png +0 -0
  310. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/foreground.png +0 -0
  311. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/layered_image.json +7 -0
  312. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/startIcon.png +0 -0
  313. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/profile/main_pages.json +5 -0
  314. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/en_US/element/string.json +16 -0
  315. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/zh_CN/element/string.json +16 -0
  316. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/mock/mock-config.json5 +2 -0
  317. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/test/Ability.test.ets +55 -0
  318. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/test/List.test.ets +25 -0
  319. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testability/TestAbility.ets +67 -0
  320. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testability/pages/Index.ets +37 -0
  321. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets +110 -0
  322. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/module.json5 +38 -0
  323. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/element/color.json +8 -0
  324. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/element/string.json +16 -0
  325. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/media/icon.png +0 -0
  326. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/profile/test_pages.json +5 -0
  327. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/test/List.test.ets +25 -0
  328. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/test/LocalUnit.test.ets +53 -0
  329. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/hvigor/hvigor-config.json5 +21 -0
  330. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/hvigorfile.ts +6 -0
  331. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/oh-package.json5 +15 -0
  332. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/CMakeLists.txt +27 -0
  333. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/CMakeLists.txt +65 -0
  334. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/TestInterProcessLock.cpp +130 -0
  335. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/UnitTest.cpp +272 -0
  336. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/demo.cpp +1431 -0
  337. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/process.cpp +78 -0
  338. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/CMakeLists.txt +87 -0
  339. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/callback.go +121 -0
  340. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/go.mod +3 -0
  341. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/golang-bridge.cpp +731 -0
  342. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/golang-bridge.h +131 -0
  343. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/mmkv.go +817 -0
  344. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/mmkv_test.go +33 -0
  345. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/test/go.mod +7 -0
  346. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/test/main.go +455 -0
  347. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/src/CMakeLists.txt +83 -0
  348. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/src/libmmkv.cpp +21 -0
  349. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/CMakeLists.txt +62 -0
  350. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/README.md +6 -0
  351. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/demo.py +368 -0
  352. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/libmmkv_python.cpp +454 -0
  353. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.appveyor.yml +35 -0
  354. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.clang-format +38 -0
  355. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.clang-tidy +77 -0
  356. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.cmake-format.yaml +73 -0
  357. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.codespell-ignore-lines +24 -0
  358. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.gitattributes +1 -0
  359. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/CODEOWNERS +9 -0
  360. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/CONTRIBUTING.md +388 -0
  361. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml +61 -0
  362. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/ISSUE_TEMPLATE/config.yml +8 -0
  363. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/dependabot.yml +15 -0
  364. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/labeler.yml +13 -0
  365. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/labeler_merged.yml +8 -0
  366. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/matchers/pylint.json +32 -0
  367. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/pull_request_template.md +19 -0
  368. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/ci.yml +1233 -0
  369. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/configure.yml +92 -0
  370. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/format.yml +60 -0
  371. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/labeler.yml +25 -0
  372. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/pip.yml +117 -0
  373. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/upstream.yml +116 -0
  374. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.pre-commit-config.yaml +156 -0
  375. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.readthedocs.yml +20 -0
  376. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/CMakeLists.txt +375 -0
  377. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/LICENSE +29 -0
  378. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/MANIFEST.in +6 -0
  379. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/README.rst +181 -0
  380. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/SECURITY.md +13 -0
  381. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/Doxyfile +21 -0
  382. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/_static/css/custom.css +3 -0
  383. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/chrono.rst +81 -0
  384. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/custom.rst +93 -0
  385. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/eigen.rst +310 -0
  386. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/functional.rst +109 -0
  387. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/index.rst +43 -0
  388. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/overview.rst +170 -0
  389. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/stl.rst +249 -0
  390. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/strings.rst +296 -0
  391. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/classes.rst +1335 -0
  392. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/embedding.rst +262 -0
  393. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/exceptions.rst +401 -0
  394. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/functions.rst +614 -0
  395. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/misc.rst +429 -0
  396. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/index.rst +13 -0
  397. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/numpy.rst +453 -0
  398. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/object.rst +286 -0
  399. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/utilities.rst +155 -0
  400. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/smart_ptrs.rst +174 -0
  401. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/basics.rst +307 -0
  402. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/benchmark.py +89 -0
  403. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/benchmark.rst +95 -0
  404. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/changelog.rst +3121 -0
  405. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/classes.rst +555 -0
  406. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/cmake/index.rst +8 -0
  407. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/compiling.rst +726 -0
  408. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/conf.py +369 -0
  409. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/faq.rst +308 -0
  410. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/index.rst +48 -0
  411. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/installing.rst +105 -0
  412. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/limitations.rst +72 -0
  413. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11-logo.png +0 -0
  414. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python1.png +0 -0
  415. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python1.svg +427 -0
  416. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python2.png +0 -0
  417. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python2.svg +427 -0
  418. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/reference.rst +130 -0
  419. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/release.rst +143 -0
  420. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/requirements.in +6 -0
  421. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/requirements.txt +275 -0
  422. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/upgrade.rst +594 -0
  423. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/attr.h +690 -0
  424. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/buffer_info.h +208 -0
  425. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/cast.h +1848 -0
  426. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/chrono.h +225 -0
  427. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/common.h +2 -0
  428. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/complex.h +74 -0
  429. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/class.h +754 -0
  430. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/common.h +1268 -0
  431. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/descr.h +172 -0
  432. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/init.h +434 -0
  433. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/internals.h +749 -0
  434. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/type_caster_base.h +1214 -0
  435. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/typeid.h +65 -0
  436. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/common.h +9 -0
  437. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/matrix.h +714 -0
  438. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/tensor.h +517 -0
  439. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen.h +12 -0
  440. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/embed.h +313 -0
  441. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eval.h +156 -0
  442. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/functional.h +138 -0
  443. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/gil.h +219 -0
  444. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/gil_safe_call_once.h +91 -0
  445. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/iostream.h +265 -0
  446. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/numpy.h +2135 -0
  447. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/operators.h +202 -0
  448. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/options.h +92 -0
  449. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/pybind11.h +3026 -0
  450. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/pytypes.h +2604 -0
  451. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl/filesystem.h +115 -0
  452. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl.h +448 -0
  453. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl_bind.h +822 -0
  454. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/type_caster_pyobject_ptr.h +61 -0
  455. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/typing.h +239 -0
  456. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/noxfile.py +107 -0
  457. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/__init__.py +19 -0
  458. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/__main__.py +63 -0
  459. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/_version.py +12 -0
  460. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/commands.py +39 -0
  461. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/py.typed +0 -0
  462. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/setup_helpers.py +500 -0
  463. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pyproject.toml +87 -0
  464. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/setup.cfg +43 -0
  465. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/setup.py +149 -0
  466. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/CMakeLists.txt +589 -0
  467. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/conftest.py +224 -0
  468. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/constructor_stats.h +322 -0
  469. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/cross_module_gil_utils.cpp +111 -0
  470. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/cross_module_interleaved_error_already_set.cpp +54 -0
  471. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/eigen_tensor_avoid_stl_array.cpp +16 -0
  472. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/env.py +31 -0
  473. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_python_package/pytest.ini +0 -0
  474. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_python_package/test_files.py +296 -0
  475. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_setuptools/pytest.ini +0 -0
  476. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_setuptools/test_setuphelper.py +153 -0
  477. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/local_bindings.h +92 -0
  478. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/object.h +205 -0
  479. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_cross_module_tests.cpp +149 -0
  480. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_tests.cpp +131 -0
  481. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_tests.h +98 -0
  482. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pytest.ini +23 -0
  483. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/requirements.txt +13 -0
  484. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_async.cpp +25 -0
  485. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_async.py +26 -0
  486. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_buffers.cpp +259 -0
  487. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_buffers.py +230 -0
  488. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_builtin_casters.cpp +387 -0
  489. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_builtin_casters.py +530 -0
  490. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_call_policies.cpp +113 -0
  491. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_call_policies.py +249 -0
  492. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_callbacks.cpp +280 -0
  493. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_callbacks.py +227 -0
  494. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_chrono.cpp +81 -0
  495. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_chrono.py +207 -0
  496. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_class.cpp +656 -0
  497. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_class.py +503 -0
  498. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/CMakeLists.txt +80 -0
  499. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/embed.cpp +23 -0
  500. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +28 -0
  501. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +39 -0
  502. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +46 -0
  503. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/main.cpp +6 -0
  504. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +47 -0
  505. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +41 -0
  506. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +47 -0
  507. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/test.py +10 -0
  508. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_const_name.cpp +55 -0
  509. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_const_name.py +31 -0
  510. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_constants_and_functions.cpp +158 -0
  511. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_constants_and_functions.py +58 -0
  512. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_copy_move.cpp +544 -0
  513. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_copy_move.py +140 -0
  514. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_casters.cpp +217 -0
  515. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_casters.py +124 -0
  516. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_setup.cpp +41 -0
  517. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_setup.py +50 -0
  518. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_docstring_options.cpp +129 -0
  519. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_docstring_options.py +66 -0
  520. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_matrix.cpp +443 -0
  521. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_matrix.py +816 -0
  522. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.cpp +18 -0
  523. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.inl +332 -0
  524. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.py +290 -0
  525. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/CMakeLists.txt +54 -0
  526. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/catch.cpp +43 -0
  527. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/external_module.cpp +20 -0
  528. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_interpreter.cpp +488 -0
  529. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_interpreter.py +16 -0
  530. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_trampoline.py +18 -0
  531. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_enum.cpp +133 -0
  532. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_enum.py +270 -0
  533. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval.cpp +118 -0
  534. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval.py +52 -0
  535. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval_call.py +5 -0
  536. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.cpp +388 -0
  537. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.h +13 -0
  538. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.py +434 -0
  539. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_factory_constructors.cpp +430 -0
  540. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_factory_constructors.py +518 -0
  541. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_gil_scoped.cpp +144 -0
  542. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_gil_scoped.py +244 -0
  543. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_iostream.cpp +126 -0
  544. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_iostream.py +293 -0
  545. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_kwargs_and_defaults.cpp +325 -0
  546. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_kwargs_and_defaults.py +428 -0
  547. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_local_bindings.cpp +106 -0
  548. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_local_bindings.py +259 -0
  549. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_methods_and_attributes.cpp +492 -0
  550. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_methods_and_attributes.py +539 -0
  551. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_modules.cpp +125 -0
  552. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_modules.py +118 -0
  553. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_multiple_inheritance.cpp +341 -0
  554. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_multiple_inheritance.py +495 -0
  555. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_array.cpp +547 -0
  556. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_array.py +672 -0
  557. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_dtypes.cpp +639 -0
  558. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_dtypes.py +448 -0
  559. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_vectorize.cpp +107 -0
  560. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_vectorize.py +268 -0
  561. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_opaque_types.cpp +77 -0
  562. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_opaque_types.py +60 -0
  563. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_operator_overloading.cpp +281 -0
  564. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_operator_overloading.py +153 -0
  565. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pickling.cpp +194 -0
  566. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pickling.py +95 -0
  567. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_python_multiple_inheritance.cpp +45 -0
  568. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_python_multiple_inheritance.py +36 -0
  569. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pytypes.cpp +926 -0
  570. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pytypes.py +1050 -0
  571. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_sequences_and_iterators.cpp +600 -0
  572. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_sequences_and_iterators.py +267 -0
  573. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_smart_ptr.cpp +473 -0
  574. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_smart_ptr.py +317 -0
  575. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl.cpp +549 -0
  576. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl.py +383 -0
  577. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl_binders.cpp +275 -0
  578. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl_binders.py +395 -0
  579. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_tagbased_polymorphic.cpp +147 -0
  580. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_tagbased_polymorphic.py +30 -0
  581. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_thread.cpp +66 -0
  582. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_thread.py +44 -0
  583. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_type_caster_pyobject_ptr.cpp +167 -0
  584. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_type_caster_pyobject_ptr.py +122 -0
  585. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_union.cpp +22 -0
  586. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_union.py +10 -0
  587. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_a.cpp +38 -0
  588. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_a.py +36 -0
  589. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_b.cpp +13 -0
  590. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_b.py +7 -0
  591. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_vector_unique_ptr_member.cpp +54 -0
  592. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_vector_unique_ptr_member.py +16 -0
  593. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_virtual_functions.cpp +592 -0
  594. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_virtual_functions.py +460 -0
  595. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/valgrind-numpy-scipy.supp +140 -0
  596. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/valgrind-python.supp +117 -0
  597. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindCatch.cmake +76 -0
  598. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindEigen3.cmake +86 -0
  599. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindPythonLibsNew.cmake +310 -0
  600. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/JoinPaths.cmake +23 -0
  601. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/check-style.sh +44 -0
  602. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/cmake_uninstall.cmake.in +23 -0
  603. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/codespell_ignore_lines_from_errors.py +40 -0
  604. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/libsize.py +38 -0
  605. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/make_changelog.py +92 -0
  606. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11.pc.in +7 -0
  607. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Common.cmake +429 -0
  608. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Config.cmake.in +233 -0
  609. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11GuessPythonExtSuffix.cmake +86 -0
  610. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11NewTools.cmake +341 -0
  611. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Tools.cmake +239 -0
  612. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pyproject.toml +3 -0
  613. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/setup_global.py.in +63 -0
  614. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/setup_main.py.in +44 -0
  615. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake +161 -0
  616. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/setup.py +76 -0
  617. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/unit_test.py +209 -0
  618. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/README.md +357 -0
  619. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/README_CN.md +301 -0
  620. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/SECURITY.md +15 -0
  621. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Script/dumpJavaSignature.py +144 -0
  622. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Script/formatCode.py +17 -0
  623. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/.clang-format +35 -0
  624. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32.sln +58 -0
  625. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.cpp +548 -0
  626. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.vcxproj +190 -0
  627. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.vcxproj.filters +30 -0
  628. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/pch.cpp +23 -0
  629. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/pch.h +28 -0
  630. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.cpp +88 -0
  631. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.vcxproj +188 -0
  632. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.vcxproj.filters +30 -0
  633. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/pch.cpp +21 -0
  634. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/pch.h +24 -0
  635. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.metadata +10 -0
  636. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.vscode/launch.json +162 -0
  637. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.vscode/settings.json +12 -0
  638. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/CHANGELOG.md +196 -0
  639. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/LICENSE +193 -0
  640. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/README.md +217 -0
  641. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/analysis_options.yaml +49 -0
  642. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/README.md +16 -0
  643. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/build.gradle +79 -0
  644. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/AndroidManifest.xml +41 -0
  645. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/java/com/tencent/mmkv_example/MainActivity.java +25 -0
  646. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/drawable/launch_background.xml +12 -0
  647. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  648. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  649. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  650. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  651. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  652. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/values/styles.xml +18 -0
  653. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/profile/AndroidManifest.xml +7 -0
  654. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/build.gradle +29 -0
  655. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
  656. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/gradle.properties +4 -0
  657. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/settings.gradle +25 -0
  658. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/settings_aar.gradle +1 -0
  659. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/AppFrameworkInfo.plist +26 -0
  660. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/Debug.xcconfig +2 -0
  661. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/Release.xcconfig +2 -0
  662. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/ephemeral/flutter_lldb_helper.py +32 -0
  663. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/ephemeral/flutter_lldbinit +5 -0
  664. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Podfile +49 -0
  665. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/AppDelegate.h +26 -0
  666. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/AppDelegate.m +33 -0
  667. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +122 -0
  668. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png +0 -0
  669. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
  670. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
  671. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
  672. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
  673. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
  674. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
  675. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
  676. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
  677. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
  678. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
  679. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
  680. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
  681. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
  682. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
  683. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +23 -0
  684. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
  685. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
  686. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
  687. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +5 -0
  688. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +37 -0
  689. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Base.lproj/Main.storyboard +29 -0
  690. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Info.plist +49 -0
  691. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Runner.entitlements +10 -0
  692. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/main.m +29 -0
  693. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.pbxproj +612 -0
  694. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  695. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  696. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  697. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +90 -0
  698. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/contents.xcworkspacedata +10 -0
  699. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  700. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  701. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/lib/main.dart +565 -0
  702. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/CMakeLists.txt +128 -0
  703. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/CMakeLists.txt +88 -0
  704. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugin_registrant.cc +15 -0
  705. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugin_registrant.h +15 -0
  706. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugins.cmake +24 -0
  707. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/CMakeLists.txt +26 -0
  708. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/main.cc +6 -0
  709. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/my_application.cc +130 -0
  710. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/my_application.h +18 -0
  711. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/Flutter-Debug.xcconfig +2 -0
  712. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/Flutter-Release.xcconfig +2 -0
  713. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/GeneratedPluginRegistrant.swift +14 -0
  714. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Podfile +47 -0
  715. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/AppDelegate.swift +13 -0
  716. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
  717. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
  718. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
  719. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
  720. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
  721. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
  722. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
  723. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
  724. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Base.lproj/MainMenu.xib +343 -0
  725. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/AppInfo.xcconfig +14 -0
  726. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Debug.xcconfig +2 -0
  727. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Release.xcconfig +2 -0
  728. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Warnings.xcconfig +13 -0
  729. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/DebugProfile.entitlements +12 -0
  730. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Info.plist +32 -0
  731. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/MainFlutterWindow.swift +15 -0
  732. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Release.entitlements +8 -0
  733. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/project.pbxproj +800 -0
  734. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  735. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +99 -0
  736. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/contents.xcworkspacedata +10 -0
  737. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  738. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +5 -0
  739. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/RunnerTests/RunnerTests.swift +12 -0
  740. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/app.json5 +10 -0
  741. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/resources/base/element/string.json +8 -0
  742. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/resources/base/media/app_icon.png +0 -0
  743. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/build-profile.json5 +41 -0
  744. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/build-profile.json5 +34 -0
  745. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/hvigorfile.ts +17 -0
  746. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/oh-package.json5 +13 -0
  747. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets +36 -0
  748. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/pages/Index.ets +38 -0
  749. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/plugins/GeneratedPluginRegistrant.ets +28 -0
  750. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/module.json5 +53 -0
  751. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/element/color.json +8 -0
  752. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/element/string.json +16 -0
  753. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/media/icon.png +0 -0
  754. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/profile/main_pages.json +5 -0
  755. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/en_US/element/string.json +16 -0
  756. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/zh_CN/element/string.json +16 -0
  757. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/test/Ability.test.ets +50 -0
  758. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/test/List.test.ets +20 -0
  759. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets +63 -0
  760. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets +49 -0
  761. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts +64 -0
  762. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/module.json5 +51 -0
  763. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/element/color.json +8 -0
  764. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/element/string.json +16 -0
  765. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/media/icon.png +0 -0
  766. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/profile/test_pages.json +5 -0
  767. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/hvigor/hvigor-config.json5 +20 -0
  768. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/hvigorfile.ts +21 -0
  769. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/oh-package.json5 +21 -0
  770. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/pubspec.yaml +75 -0
  771. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/CMakeLists.txt +108 -0
  772. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/CMakeLists.txt +109 -0
  773. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugin_registrant.cc +14 -0
  774. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugin_registrant.h +15 -0
  775. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugins.cmake +24 -0
  776. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/CMakeLists.txt +40 -0
  777. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/Runner.rc +121 -0
  778. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/flutter_window.cpp +71 -0
  779. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/flutter_window.h +33 -0
  780. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/main.cpp +43 -0
  781. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/resource.h +16 -0
  782. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/resources/app_icon.ico +0 -0
  783. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/runner.exe.manifest +14 -0
  784. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/utils.cpp +65 -0
  785. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/utils.h +19 -0
  786. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/win32_window.cpp +288 -0
  787. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/win32_window.h +102 -0
  788. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/lib/mmkv.dart +1052 -0
  789. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/mmkv.iml +17 -0
  790. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/pubspec.yaml +62 -0
  791. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/test/mmkv_test.dart +48 -0
  792. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/tool/fix_mmkv_plugin_name.rb +4 -0
  793. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/tool/mmkvpodhelper.rb +23 -0
  794. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv.iml +25 -0
  795. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/CHANGELOG.md +48 -0
  796. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/LICENSE +193 -0
  797. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/README.md +17 -0
  798. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/build.gradle +39 -0
  799. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  800. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  801. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle.properties +4 -0
  802. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradlew +160 -0
  803. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradlew.bat +90 -0
  804. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/settings.gradle +1 -0
  805. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/src/main/AndroidManifest.xml +1 -0
  806. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/src/main/java/com/tencent/mmkv/MMKVPlugin.java +82 -0
  807. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/lib/mmkv_android.dart +76 -0
  808. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/pubspec.yaml +40 -0
  809. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/.metadata +33 -0
  810. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/CHANGELOG.md +52 -0
  811. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/LICENSE +193 -0
  812. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/README.md +17 -0
  813. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/MMKVPlugin.h +28 -0
  814. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/MMKVPlugin.mm +39 -0
  815. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/flutter-bridge.h +32 -0
  816. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/flutter-bridge.mm +693 -0
  817. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/mmkv_ios.podspec +35 -0
  818. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/lib/mmkv_ios.dart +78 -0
  819. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/pubspec.yaml +44 -0
  820. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/.metadata +30 -0
  821. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/CHANGELOG.md +9 -0
  822. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/LICENSE +193 -0
  823. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/README.md +17 -0
  824. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/analysis_options.yaml +4 -0
  825. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/lib/mmkv_linux.dart +69 -0
  826. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/CMakeLists.txt +63 -0
  827. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/flutter-bridge.cpp +694 -0
  828. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/include/mmkv_linux/mmkv_linux_plugin.h +46 -0
  829. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/mmkv_linux_plugin.cc +97 -0
  830. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/pubspec.yaml +47 -0
  831. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/.metadata +30 -0
  832. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/CHANGELOG.md +42 -0
  833. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/LICENSE +193 -0
  834. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/README.md +17 -0
  835. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/analysis_options.yaml +4 -0
  836. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/lib/mmkv_ohos.dart +84 -0
  837. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/build-profile.json5 +10 -0
  838. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/hvigorfile.ts +2 -0
  839. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/index.ets +17 -0
  840. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/oh-package.json5 +15 -0
  841. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/src/main/ets/components/plugin/MMKVPlugin.ets +78 -0
  842. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/src/main/module.json5 +10 -0
  843. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/pubspec.yaml +50 -0
  844. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/CHANGELOG.md +38 -0
  845. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/LICENSE +193 -0
  846. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/README.md +30 -0
  847. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/lib/mmkv_platform_ffi.dart +363 -0
  848. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/lib/mmkv_platform_interface.dart +363 -0
  849. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/pubspec.yaml +23 -0
  850. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/.metadata +30 -0
  851. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/CHANGELOG.md +9 -0
  852. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/LICENSE +193 -0
  853. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/README.md +17 -0
  854. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/analysis_options.yaml +4 -0
  855. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/lib/mmkv_win32.dart +69 -0
  856. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/pubspec.yaml +47 -0
  857. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/CMakeLists.txt +71 -0
  858. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/flutter-bridge.cpp +721 -0
  859. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/include/mmkv_win32/mmkv_win32_plugin.h +43 -0
  860. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/mmkv_win32_plugin.cpp +88 -0
  861. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/AutoCleanInfo.hpp +65 -0
  862. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/MMKV.h +552 -0
  863. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/MMKVHandler.h +60 -0
  864. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/Resources/Info.plist +24 -0
  865. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/libMMKV.mm +1361 -0
  866. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.pbxproj +967 -0
  867. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  868. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  869. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV For App Extension.xcscheme +67 -0
  870. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV Static.xcscheme +76 -0
  871. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV.xcscheme +76 -0
  872. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKVWatchExtension.xcscheme +67 -0
  873. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/Config.xcconfig +10 -0
  874. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/AppDelegate.h +15 -0
  875. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/AppDelegate.m +43 -0
  876. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
  877. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/AppIcon.appiconset/Contents.json +13 -0
  878. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/Contents.json +6 -0
  879. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Base.lproj/LaunchScreen.storyboard +25 -0
  880. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Base.lproj/Main.storyboard +42 -0
  881. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Info.plist +25 -0
  882. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/MMKVCatalystDemo.entitlements +12 -0
  883. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/SceneDelegate.h +16 -0
  884. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/SceneDelegate.m +58 -0
  885. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/ViewController.h +15 -0
  886. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/ViewController.mm +85 -0
  887. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/main.m +19 -0
  888. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/AppDelegate.h +27 -0
  889. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/AppDelegate.m +135 -0
  890. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/DemoSwiftUsage.swift +82 -0
  891. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/MMKVDemo-Bridging-Header.h +22 -0
  892. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +98 -0
  893. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Base.lproj/LaunchScreen.storyboard +25 -0
  894. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Base.lproj/Main.storyboard +48 -0
  895. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Info.plist +49 -0
  896. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/MMKVDemo.entitlements +10 -0
  897. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/testReadOnly +0 -0
  898. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/testReadOnly.crc +0 -0
  899. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/TestMMKVCpp.cpp +204 -0
  900. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/TestMMKVCpp.hpp +18 -0
  901. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController+TestCaseBad.h +39 -0
  902. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController+TestCaseBad.mm +200 -0
  903. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController.h +32 -0
  904. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController.mm +1245 -0
  905. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/main.m +28 -0
  906. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.pbxproj +1944 -0
  907. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  908. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  909. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  910. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVDemo.xcscheme +88 -0
  911. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVMacDemo.xcscheme +78 -0
  912. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVTodayExtensionDemo.xcscheme +116 -0
  913. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/WatchApp (Notification).xcscheme +106 -0
  914. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/WatchApp.xcscheme +102 -0
  915. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/kvdemo.xcscheme +78 -0
  916. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/Info.plist +22 -0
  917. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/MMKVDemoTests.mm +554 -0
  918. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/MMKVPerformanceTest.mm +118 -0
  919. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/AppDelegate.h +13 -0
  920. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/AppDelegate.m +27 -0
  921. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Assets.xcassets/AppIcon.appiconset/Contents.json +58 -0
  922. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Assets.xcassets/Contents.json +6 -0
  923. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Base.lproj/Main.storyboard +718 -0
  924. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Info.plist +32 -0
  925. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/MMKVMacDemo.entitlements +10 -0
  926. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/ViewController.h +13 -0
  927. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/ViewController.mm +352 -0
  928. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/main.m +15 -0
  929. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/Base.lproj/MainInterface.storyboard +45 -0
  930. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/Info.plist +31 -0
  931. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/MMKVTodayExtensionDemo.entitlements +10 -0
  932. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/TodayViewController.h +25 -0
  933. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/TodayViewController.m +106 -0
  934. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json +12 -0
  935. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json +6 -0
  936. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Contents.json +17 -0
  937. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json +12 -0
  938. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json +6 -0
  939. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json +12 -0
  940. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json +6 -0
  941. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/Contents.json +6 -0
  942. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/ContentView.swift +71 -0
  943. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Info.plist +15 -0
  944. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/MMKVVisionDemoApp.swift +22 -0
  945. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Preview Content/Preview Assets.xcassets/Contents.json +6 -0
  946. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Assets.xcassets/AppIcon.appiconset/Contents.json +81 -0
  947. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Assets.xcassets/Contents.json +6 -0
  948. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Base.lproj/Interface.storyboard +47 -0
  949. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Info.plist +33 -0
  950. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json +28 -0
  951. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Contents.json +48 -0
  952. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json +28 -0
  953. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json +28 -0
  954. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json +28 -0
  955. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json +28 -0
  956. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json +28 -0
  957. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json +28 -0
  958. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json +28 -0
  959. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Contents.json +6 -0
  960. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/ExtensionDelegate.h +25 -0
  961. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/ExtensionDelegate.mm +135 -0
  962. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Info.plist +36 -0
  963. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/InterfaceController.h +26 -0
  964. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/InterfaceController.m +50 -0
  965. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/NotificationController.h +26 -0
  966. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/NotificationController.m +60 -0
  967. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/PushNotificationPayload.apns +20 -0
  968. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/AppDelegate.h +15 -0
  969. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/AppDelegate.m +49 -0
  970. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
  971. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/AppIcon.appiconset/Contents.json +13 -0
  972. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/Contents.json +6 -0
  973. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Base.lproj/LaunchScreen.storyboard +25 -0
  974. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Base.lproj/Main.storyboard +45 -0
  975. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Info.plist +25 -0
  976. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/SceneDelegate.h +16 -0
  977. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/SceneDelegate.m +58 -0
  978. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/ViewController.h +15 -0
  979. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/ViewController.m +38 -0
  980. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/kvdemo.entitlements +10 -0
  981. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/main.m +19 -0
  982. package/harmony/reactNativeMMKV/src/main/cpp/MMKVManagedBuffer.h +49 -0
  983. package/harmony/reactNativeMMKV/src/main/cpp/MmkvCxx.cpp +152 -0
  984. package/harmony/reactNativeMMKV/src/main/cpp/MmkvCxx.h +36 -0
  985. package/harmony/reactNativeMMKV/src/main/cpp/MmkvHostObject.cpp +357 -0
  986. package/harmony/reactNativeMMKV/src/main/cpp/MmkvHostObject.h +66 -0
  987. package/harmony/reactNativeMMKV/src/main/cpp/MmkvLogger.h +52 -0
  988. package/harmony/reactNativeMMKV/src/main/cpp/MmkvPlatformContext.cpp +37 -0
  989. package/harmony/reactNativeMMKV/src/main/cpp/MmkvPlatformContext.h +36 -0
  990. package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVComponentDescriptor.h +65 -0
  991. package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVJSIBinder.h +55 -0
  992. package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVPackage.h +67 -0
  993. package/harmony/reactNativeMMKV/src/main/cpp/Props.cpp +37 -0
  994. package/harmony/reactNativeMMKV/src/main/cpp/Props.h +42 -0
  995. package/harmony/reactNativeMMKV/src/main/cpp/ShadowNodes.cpp +39 -0
  996. package/harmony/reactNativeMMKV/src/main/cpp/ShadowNodes.h +41 -0
  997. package/harmony/reactNativeMMKV/src/main/cpp/States.cpp +40 -0
  998. package/harmony/reactNativeMMKV/src/main/cpp/States.h +45 -0
  999. package/harmony/reactNativeMMKV/src/main/ets/Logger.ts +65 -0
  1000. package/harmony/reactNativeMMKV/src/main/ets/MmkvCxxPackage.ts +46 -0
  1001. package/harmony/reactNativeMMKV/src/main/ets/MmkvCxxTurboModule.ts +60 -0
  1002. package/harmony/reactNativeMMKV/src/main/ets/MmkvPlatformContextPackage.ts +46 -0
  1003. package/harmony/reactNativeMMKV/src/main/ets/MmkvPlatformContextTurboModule.ts +48 -0
  1004. package/harmony/reactNativeMMKV/src/main/module.json5 +7 -0
  1005. package/harmony/reactNativeMMKV/src/main/resources/base/element/string.json +8 -0
  1006. package/harmony/reactNativeMMKV/src/main/resources/en_US/element/string.json +8 -0
  1007. package/harmony/reactNativeMMKV/src/main/resources/zh_CN/element/string.json +8 -0
  1008. package/harmony/reactNativeMMKV/ts.ts +27 -0
  1009. package/harmony/reactNativeMMKV.har +0 -0
  1010. package/lib/commonjs/MMKV.js +124 -0
  1011. package/lib/commonjs/MMKV.js.map +1 -0
  1012. package/lib/commonjs/MemoryWarningListener.js +31 -0
  1013. package/lib/commonjs/MemoryWarningListener.js.map +1 -0
  1014. package/lib/commonjs/MemoryWarningListener.web.js +11 -0
  1015. package/lib/commonjs/MemoryWarningListener.web.js.map +1 -0
  1016. package/lib/commonjs/ModuleNotFoundError.js +75 -0
  1017. package/lib/commonjs/ModuleNotFoundError.js.map +1 -0
  1018. package/lib/commonjs/NativeMmkv.js +53 -0
  1019. package/lib/commonjs/NativeMmkv.js.map +1 -0
  1020. package/lib/commonjs/NativeMmkvPlatformContext.js +22 -0
  1021. package/lib/commonjs/NativeMmkvPlatformContext.js.map +1 -0
  1022. package/lib/commonjs/PlatformChecker.js +14 -0
  1023. package/lib/commonjs/PlatformChecker.js.map +1 -0
  1024. package/lib/commonjs/Types.js +32 -0
  1025. package/lib/commonjs/Types.js.map +1 -0
  1026. package/lib/commonjs/createMMKV.js +43 -0
  1027. package/lib/commonjs/createMMKV.js.map +1 -0
  1028. package/lib/commonjs/createMMKV.mock.js +43 -0
  1029. package/lib/commonjs/createMMKV.mock.js.map +1 -0
  1030. package/lib/commonjs/createMMKV.web.js +110 -0
  1031. package/lib/commonjs/createMMKV.web.js.map +1 -0
  1032. package/lib/commonjs/createTextEncoder.js +23 -0
  1033. package/lib/commonjs/createTextEncoder.js.map +1 -0
  1034. package/lib/commonjs/hooks.js +198 -0
  1035. package/lib/commonjs/hooks.js.map +1 -0
  1036. package/lib/commonjs/index.js +40 -0
  1037. package/lib/commonjs/index.js.map +1 -0
  1038. package/lib/commonjs/package.json +1 -0
  1039. package/lib/module/MMKV.js +119 -0
  1040. package/lib/module/MMKV.js.map +1 -0
  1041. package/lib/module/MemoryWarningListener.js +27 -0
  1042. package/lib/module/MemoryWarningListener.js.map +1 -0
  1043. package/lib/module/MemoryWarningListener.web.js +6 -0
  1044. package/lib/module/MemoryWarningListener.web.js.map +1 -0
  1045. package/lib/module/ModuleNotFoundError.js +70 -0
  1046. package/lib/module/ModuleNotFoundError.js.map +1 -0
  1047. package/lib/module/NativeMmkv.js +51 -0
  1048. package/lib/module/NativeMmkv.js.map +1 -0
  1049. package/lib/module/NativeMmkvPlatformContext.js +18 -0
  1050. package/lib/module/NativeMmkvPlatformContext.js.map +1 -0
  1051. package/lib/module/PlatformChecker.js +10 -0
  1052. package/lib/module/PlatformChecker.js.map +1 -0
  1053. package/lib/module/Types.js +31 -0
  1054. package/lib/module/Types.js.map +1 -0
  1055. package/lib/module/createMMKV.js +38 -0
  1056. package/lib/module/createMMKV.js.map +1 -0
  1057. package/lib/module/createMMKV.mock.js +38 -0
  1058. package/lib/module/createMMKV.mock.js.map +1 -0
  1059. package/lib/module/createMMKV.web.js +105 -0
  1060. package/lib/module/createMMKV.web.js.map +1 -0
  1061. package/lib/module/createTextEncoder.js +19 -0
  1062. package/lib/module/createTextEncoder.js.map +1 -0
  1063. package/lib/module/hooks.js +189 -0
  1064. package/lib/module/hooks.js.map +1 -0
  1065. package/lib/module/index.js +6 -0
  1066. package/lib/module/index.js.map +1 -0
  1067. package/lib/typescript/src/MMKV.d.ts +34 -0
  1068. package/lib/typescript/src/MMKV.d.ts.map +1 -0
  1069. package/lib/typescript/src/MemoryWarningListener.d.ts +3 -0
  1070. package/lib/typescript/src/MemoryWarningListener.d.ts.map +1 -0
  1071. package/lib/typescript/src/MemoryWarningListener.web.d.ts +3 -0
  1072. package/lib/typescript/src/MemoryWarningListener.web.d.ts.map +1 -0
  1073. package/lib/typescript/src/ModuleNotFoundError.d.ts +7 -0
  1074. package/lib/typescript/src/ModuleNotFoundError.d.ts.map +1 -0
  1075. package/lib/typescript/src/NativeMmkv.d.ts +91 -0
  1076. package/lib/typescript/src/NativeMmkv.d.ts.map +1 -0
  1077. package/lib/typescript/src/NativeMmkvPlatformContext.d.ts +20 -0
  1078. package/lib/typescript/src/NativeMmkvPlatformContext.d.ts.map +1 -0
  1079. package/lib/typescript/src/PlatformChecker.d.ts +2 -0
  1080. package/lib/typescript/src/PlatformChecker.d.ts.map +1 -0
  1081. package/lib/typescript/src/Types.d.ts +172 -0
  1082. package/lib/typescript/src/Types.d.ts.map +1 -0
  1083. package/lib/typescript/src/__tests__/hooks.test.d.ts +2 -0
  1084. package/lib/typescript/src/__tests__/hooks.test.d.ts.map +1 -0
  1085. package/lib/typescript/src/createMMKV.d.ts +3 -0
  1086. package/lib/typescript/src/createMMKV.d.ts.map +1 -0
  1087. package/lib/typescript/src/createMMKV.mock.d.ts +3 -0
  1088. package/lib/typescript/src/createMMKV.mock.d.ts.map +1 -0
  1089. package/lib/typescript/src/createMMKV.web.d.ts +3 -0
  1090. package/lib/typescript/src/createMMKV.web.d.ts.map +1 -0
  1091. package/lib/typescript/src/createTextEncoder.d.ts +2 -0
  1092. package/lib/typescript/src/createTextEncoder.d.ts.map +1 -0
  1093. package/lib/typescript/src/hooks.d.ts +86 -0
  1094. package/lib/typescript/src/hooks.d.ts.map +1 -0
  1095. package/lib/typescript/src/index.d.ts +4 -0
  1096. package/lib/typescript/src/index.d.ts.map +1 -0
  1097. package/package.json +187 -0
  1098. package/react-native-mmkv.podspec +38 -0
  1099. package/react-native.config.js +20 -0
  1100. package/src/MMKV.ts +142 -0
  1101. package/src/MemoryWarningListener.ts +29 -0
  1102. package/src/MemoryWarningListener.web.ts +5 -0
  1103. package/src/ModuleNotFoundError.ts +95 -0
  1104. package/src/NativeMmkv.ts +118 -0
  1105. package/src/NativeMmkvPlatformContext.ts +38 -0
  1106. package/src/PlatformChecker.ts +9 -0
  1107. package/src/Types.ts +178 -0
  1108. package/src/__tests__/hooks.test.tsx +89 -0
  1109. package/src/createMMKV.mock.ts +38 -0
  1110. package/src/createMMKV.ts +42 -0
  1111. package/src/createMMKV.web.ts +127 -0
  1112. package/src/createTextEncoder.ts +16 -0
  1113. package/src/hooks.ts +247 -0
  1114. package/src/index.ts +4 -0
@@ -0,0 +1,1214 @@
1
+ /*
2
+ pybind11/detail/type_caster_base.h (originally first part of pybind11/cast.h)
3
+
4
+ Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
5
+
6
+ All rights reserved. Use of this source code is governed by a
7
+ BSD-style license that can be found in the LICENSE file.
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include "../pytypes.h"
13
+ #include "common.h"
14
+ #include "descr.h"
15
+ #include "internals.h"
16
+ #include "typeid.h"
17
+
18
+ #include <cstdint>
19
+ #include <iterator>
20
+ #include <new>
21
+ #include <string>
22
+ #include <type_traits>
23
+ #include <typeindex>
24
+ #include <typeinfo>
25
+ #include <unordered_map>
26
+ #include <utility>
27
+ #include <vector>
28
+
29
+ PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
30
+ PYBIND11_NAMESPACE_BEGIN(detail)
31
+
32
+ /// A life support system for temporary objects created by `type_caster::load()`.
33
+ /// Adding a patient will keep it alive up until the enclosing function returns.
34
+ class loader_life_support {
35
+ private:
36
+ loader_life_support *parent = nullptr;
37
+ std::unordered_set<PyObject *> keep_alive;
38
+
39
+ // Store stack pointer in thread-local storage.
40
+ static PYBIND11_TLS_KEY_REF get_stack_tls_key() {
41
+ #if PYBIND11_INTERNALS_VERSION == 4
42
+ return get_local_internals().loader_life_support_tls_key;
43
+ #else
44
+ return get_internals().loader_life_support_tls_key;
45
+ #endif
46
+ }
47
+ static loader_life_support *get_stack_top() {
48
+ return static_cast<loader_life_support *>(PYBIND11_TLS_GET_VALUE(get_stack_tls_key()));
49
+ }
50
+ static void set_stack_top(loader_life_support *value) {
51
+ PYBIND11_TLS_REPLACE_VALUE(get_stack_tls_key(), value);
52
+ }
53
+
54
+ public:
55
+ /// A new patient frame is created when a function is entered
56
+ loader_life_support() : parent{get_stack_top()} { set_stack_top(this); }
57
+
58
+ /// ... and destroyed after it returns
59
+ ~loader_life_support() {
60
+ if (get_stack_top() != this) {
61
+ pybind11_fail("loader_life_support: internal error");
62
+ }
63
+ set_stack_top(parent);
64
+ for (auto *item : keep_alive) {
65
+ Py_DECREF(item);
66
+ }
67
+ }
68
+
69
+ /// This can only be used inside a pybind11-bound function, either by `argument_loader`
70
+ /// at argument preparation time or by `py::cast()` at execution time.
71
+ PYBIND11_NOINLINE static void add_patient(handle h) {
72
+ loader_life_support *frame = get_stack_top();
73
+ if (!frame) {
74
+ // NOTE: It would be nice to include the stack frames here, as this indicates
75
+ // use of pybind11::cast<> outside the normal call framework, finding such
76
+ // a location is challenging. Developers could consider printing out
77
+ // stack frame addresses here using something like __builtin_frame_address(0)
78
+ throw cast_error("When called outside a bound function, py::cast() cannot "
79
+ "do Python -> C++ conversions which require the creation "
80
+ "of temporary values");
81
+ }
82
+
83
+ if (frame->keep_alive.insert(h.ptr()).second) {
84
+ Py_INCREF(h.ptr());
85
+ }
86
+ }
87
+ };
88
+
89
+ // Gets the cache entry for the given type, creating it if necessary. The return value is the pair
90
+ // returned by emplace, i.e. an iterator for the entry and a bool set to `true` if the entry was
91
+ // just created.
92
+ inline std::pair<decltype(internals::registered_types_py)::iterator, bool>
93
+ all_type_info_get_cache(PyTypeObject *type);
94
+
95
+ // Band-aid workaround to fix a subtle but serious bug in a minimalistic fashion. See PR #4762.
96
+ inline void all_type_info_add_base_most_derived_first(std::vector<type_info *> &bases,
97
+ type_info *addl_base) {
98
+ for (auto it = bases.begin(); it != bases.end(); it++) {
99
+ type_info *existing_base = *it;
100
+ if (PyType_IsSubtype(addl_base->type, existing_base->type) != 0) {
101
+ bases.insert(it, addl_base);
102
+ return;
103
+ }
104
+ }
105
+ bases.push_back(addl_base);
106
+ }
107
+
108
+ // Populates a just-created cache entry.
109
+ PYBIND11_NOINLINE void all_type_info_populate(PyTypeObject *t, std::vector<type_info *> &bases) {
110
+ assert(bases.empty());
111
+ std::vector<PyTypeObject *> check;
112
+ for (handle parent : reinterpret_borrow<tuple>(t->tp_bases)) {
113
+ check.push_back((PyTypeObject *) parent.ptr());
114
+ }
115
+
116
+ auto const &type_dict = get_internals().registered_types_py;
117
+ for (size_t i = 0; i < check.size(); i++) {
118
+ auto *type = check[i];
119
+ // Ignore Python2 old-style class super type:
120
+ if (!PyType_Check((PyObject *) type)) {
121
+ continue;
122
+ }
123
+
124
+ // Check `type` in the current set of registered python types:
125
+ auto it = type_dict.find(type);
126
+ if (it != type_dict.end()) {
127
+ // We found a cache entry for it, so it's either pybind-registered or has pre-computed
128
+ // pybind bases, but we have to make sure we haven't already seen the type(s) before:
129
+ // we want to follow Python/virtual C++ rules that there should only be one instance of
130
+ // a common base.
131
+ for (auto *tinfo : it->second) {
132
+ // NB: Could use a second set here, rather than doing a linear search, but since
133
+ // having a large number of immediate pybind11-registered types seems fairly
134
+ // unlikely, that probably isn't worthwhile.
135
+ bool found = false;
136
+ for (auto *known : bases) {
137
+ if (known == tinfo) {
138
+ found = true;
139
+ break;
140
+ }
141
+ }
142
+ if (!found) {
143
+ all_type_info_add_base_most_derived_first(bases, tinfo);
144
+ }
145
+ }
146
+ } else if (type->tp_bases) {
147
+ // It's some python type, so keep follow its bases classes to look for one or more
148
+ // registered types
149
+ if (i + 1 == check.size()) {
150
+ // When we're at the end, we can pop off the current element to avoid growing
151
+ // `check` when adding just one base (which is typical--i.e. when there is no
152
+ // multiple inheritance)
153
+ check.pop_back();
154
+ i--;
155
+ }
156
+ for (handle parent : reinterpret_borrow<tuple>(type->tp_bases)) {
157
+ check.push_back((PyTypeObject *) parent.ptr());
158
+ }
159
+ }
160
+ }
161
+ }
162
+
163
+ /**
164
+ * Extracts vector of type_info pointers of pybind-registered roots of the given Python type. Will
165
+ * be just 1 pybind type for the Python type of a pybind-registered class, or for any Python-side
166
+ * derived class that uses single inheritance. Will contain as many types as required for a Python
167
+ * class that uses multiple inheritance to inherit (directly or indirectly) from multiple
168
+ * pybind-registered classes. Will be empty if neither the type nor any base classes are
169
+ * pybind-registered.
170
+ *
171
+ * The value is cached for the lifetime of the Python type.
172
+ */
173
+ inline const std::vector<detail::type_info *> &all_type_info(PyTypeObject *type) {
174
+ auto ins = all_type_info_get_cache(type);
175
+ if (ins.second) {
176
+ // New cache entry: populate it
177
+ all_type_info_populate(type, ins.first->second);
178
+ }
179
+
180
+ return ins.first->second;
181
+ }
182
+
183
+ /**
184
+ * Gets a single pybind11 type info for a python type. Returns nullptr if neither the type nor any
185
+ * ancestors are pybind11-registered. Throws an exception if there are multiple bases--use
186
+ * `all_type_info` instead if you want to support multiple bases.
187
+ */
188
+ PYBIND11_NOINLINE detail::type_info *get_type_info(PyTypeObject *type) {
189
+ const auto &bases = all_type_info(type);
190
+ if (bases.empty()) {
191
+ return nullptr;
192
+ }
193
+ if (bases.size() > 1) {
194
+ pybind11_fail(
195
+ "pybind11::detail::get_type_info: type has multiple pybind11-registered bases");
196
+ }
197
+ return bases.front();
198
+ }
199
+
200
+ inline detail::type_info *get_local_type_info(const std::type_index &tp) {
201
+ auto &locals = get_local_internals().registered_types_cpp;
202
+ auto it = locals.find(tp);
203
+ if (it != locals.end()) {
204
+ return it->second;
205
+ }
206
+ return nullptr;
207
+ }
208
+
209
+ inline detail::type_info *get_global_type_info(const std::type_index &tp) {
210
+ return with_internals([&](internals &internals) {
211
+ detail::type_info *type_info = nullptr;
212
+ auto &types = internals.registered_types_cpp;
213
+ auto it = types.find(tp);
214
+ if (it != types.end()) {
215
+ type_info = it->second;
216
+ }
217
+ return type_info;
218
+ });
219
+ }
220
+
221
+ /// Return the type info for a given C++ type; on lookup failure can either throw or return
222
+ /// nullptr.
223
+ PYBIND11_NOINLINE detail::type_info *get_type_info(const std::type_index &tp,
224
+ bool throw_if_missing = false) {
225
+ if (auto *ltype = get_local_type_info(tp)) {
226
+ return ltype;
227
+ }
228
+ if (auto *gtype = get_global_type_info(tp)) {
229
+ return gtype;
230
+ }
231
+
232
+ if (throw_if_missing) {
233
+ std::string tname = tp.name();
234
+ detail::clean_type_id(tname);
235
+ pybind11_fail("pybind11::detail::get_type_info: unable to find type info for \""
236
+ + std::move(tname) + '"');
237
+ }
238
+ return nullptr;
239
+ }
240
+
241
+ PYBIND11_NOINLINE handle get_type_handle(const std::type_info &tp, bool throw_if_missing) {
242
+ detail::type_info *type_info = get_type_info(tp, throw_if_missing);
243
+ return handle(type_info ? ((PyObject *) type_info->type) : nullptr);
244
+ }
245
+
246
+ // Searches the inheritance graph for a registered Python instance, using all_type_info().
247
+ PYBIND11_NOINLINE handle find_registered_python_instance(void *src,
248
+ const detail::type_info *tinfo) {
249
+ return with_instance_map(src, [&](instance_map &instances) {
250
+ auto it_instances = instances.equal_range(src);
251
+ for (auto it_i = it_instances.first; it_i != it_instances.second; ++it_i) {
252
+ for (auto *instance_type : detail::all_type_info(Py_TYPE(it_i->second))) {
253
+ if (instance_type && same_type(*instance_type->cpptype, *tinfo->cpptype)) {
254
+ return handle((PyObject *) it_i->second).inc_ref();
255
+ }
256
+ }
257
+ }
258
+ return handle();
259
+ });
260
+ }
261
+
262
+ struct value_and_holder {
263
+ instance *inst = nullptr;
264
+ size_t index = 0u;
265
+ const detail::type_info *type = nullptr;
266
+ void **vh = nullptr;
267
+
268
+ // Main constructor for a found value/holder:
269
+ value_and_holder(instance *i, const detail::type_info *type, size_t vpos, size_t index)
270
+ : inst{i}, index{index}, type{type},
271
+ vh{inst->simple_layout ? inst->simple_value_holder
272
+ : &inst->nonsimple.values_and_holders[vpos]} {}
273
+
274
+ // Default constructor (used to signal a value-and-holder not found by get_value_and_holder())
275
+ value_and_holder() = default;
276
+
277
+ // Used for past-the-end iterator
278
+ explicit value_and_holder(size_t index) : index{index} {}
279
+
280
+ template <typename V = void>
281
+ V *&value_ptr() const {
282
+ return reinterpret_cast<V *&>(vh[0]);
283
+ }
284
+ // True if this `value_and_holder` has a non-null value pointer
285
+ explicit operator bool() const { return value_ptr() != nullptr; }
286
+
287
+ template <typename H>
288
+ H &holder() const {
289
+ return reinterpret_cast<H &>(vh[1]);
290
+ }
291
+ bool holder_constructed() const {
292
+ return inst->simple_layout
293
+ ? inst->simple_holder_constructed
294
+ : (inst->nonsimple.status[index] & instance::status_holder_constructed) != 0u;
295
+ }
296
+ // NOLINTNEXTLINE(readability-make-member-function-const)
297
+ void set_holder_constructed(bool v = true) {
298
+ if (inst->simple_layout) {
299
+ inst->simple_holder_constructed = v;
300
+ } else if (v) {
301
+ inst->nonsimple.status[index] |= instance::status_holder_constructed;
302
+ } else {
303
+ inst->nonsimple.status[index] &= (std::uint8_t) ~instance::status_holder_constructed;
304
+ }
305
+ }
306
+ bool instance_registered() const {
307
+ return inst->simple_layout
308
+ ? inst->simple_instance_registered
309
+ : ((inst->nonsimple.status[index] & instance::status_instance_registered) != 0);
310
+ }
311
+ // NOLINTNEXTLINE(readability-make-member-function-const)
312
+ void set_instance_registered(bool v = true) {
313
+ if (inst->simple_layout) {
314
+ inst->simple_instance_registered = v;
315
+ } else if (v) {
316
+ inst->nonsimple.status[index] |= instance::status_instance_registered;
317
+ } else {
318
+ inst->nonsimple.status[index] &= (std::uint8_t) ~instance::status_instance_registered;
319
+ }
320
+ }
321
+ };
322
+
323
+ // Container for accessing and iterating over an instance's values/holders
324
+ struct values_and_holders {
325
+ private:
326
+ instance *inst;
327
+ using type_vec = std::vector<detail::type_info *>;
328
+ const type_vec &tinfo;
329
+
330
+ public:
331
+ explicit values_and_holders(instance *inst)
332
+ : inst{inst}, tinfo(all_type_info(Py_TYPE(inst))) {}
333
+
334
+ explicit values_and_holders(PyObject *obj)
335
+ : inst{nullptr}, tinfo(all_type_info(Py_TYPE(obj))) {
336
+ if (!tinfo.empty()) {
337
+ inst = reinterpret_cast<instance *>(obj);
338
+ }
339
+ }
340
+
341
+ struct iterator {
342
+ private:
343
+ instance *inst = nullptr;
344
+ const type_vec *types = nullptr;
345
+ value_and_holder curr;
346
+ friend struct values_and_holders;
347
+ iterator(instance *inst, const type_vec *tinfo) : inst{inst}, types{tinfo} {
348
+ if (inst != nullptr) {
349
+ assert(!types->empty());
350
+ curr = value_and_holder(
351
+ inst /* instance */,
352
+ (*types)[0] /* type info */,
353
+ 0, /* vpos: (non-simple types only): the first vptr comes first */
354
+ 0 /* index */);
355
+ }
356
+ }
357
+ // Past-the-end iterator:
358
+ explicit iterator(size_t end) : curr(end) {}
359
+
360
+ public:
361
+ bool operator==(const iterator &other) const { return curr.index == other.curr.index; }
362
+ bool operator!=(const iterator &other) const { return curr.index != other.curr.index; }
363
+ iterator &operator++() {
364
+ if (!inst->simple_layout) {
365
+ curr.vh += 1 + (*types)[curr.index]->holder_size_in_ptrs;
366
+ }
367
+ ++curr.index;
368
+ curr.type = curr.index < types->size() ? (*types)[curr.index] : nullptr;
369
+ return *this;
370
+ }
371
+ value_and_holder &operator*() { return curr; }
372
+ value_and_holder *operator->() { return &curr; }
373
+ };
374
+
375
+ iterator begin() { return iterator(inst, &tinfo); }
376
+ iterator end() { return iterator(tinfo.size()); }
377
+
378
+ iterator find(const type_info *find_type) {
379
+ auto it = begin(), endit = end();
380
+ while (it != endit && it->type != find_type) {
381
+ ++it;
382
+ }
383
+ return it;
384
+ }
385
+
386
+ size_t size() { return tinfo.size(); }
387
+
388
+ // Band-aid workaround to fix a subtle but serious bug in a minimalistic fashion. See PR #4762.
389
+ bool is_redundant_value_and_holder(const value_and_holder &vh) {
390
+ for (size_t i = 0; i < vh.index; i++) {
391
+ if (PyType_IsSubtype(tinfo[i]->type, tinfo[vh.index]->type) != 0) {
392
+ return true;
393
+ }
394
+ }
395
+ return false;
396
+ }
397
+ };
398
+
399
+ /**
400
+ * Extracts C++ value and holder pointer references from an instance (which may contain multiple
401
+ * values/holders for python-side multiple inheritance) that match the given type. Throws an error
402
+ * if the given type (or ValueType, if omitted) is not a pybind11 base of the given instance. If
403
+ * `find_type` is omitted (or explicitly specified as nullptr) the first value/holder are returned,
404
+ * regardless of type (and the resulting .type will be nullptr).
405
+ *
406
+ * The returned object should be short-lived: in particular, it must not outlive the called-upon
407
+ * instance.
408
+ */
409
+ PYBIND11_NOINLINE value_and_holder
410
+ instance::get_value_and_holder(const type_info *find_type /*= nullptr default in common.h*/,
411
+ bool throw_if_missing /*= true in common.h*/) {
412
+ // Optimize common case:
413
+ if (!find_type || Py_TYPE(this) == find_type->type) {
414
+ return value_and_holder(this, find_type, 0, 0);
415
+ }
416
+
417
+ detail::values_and_holders vhs(this);
418
+ auto it = vhs.find(find_type);
419
+ if (it != vhs.end()) {
420
+ return *it;
421
+ }
422
+
423
+ if (!throw_if_missing) {
424
+ return value_and_holder();
425
+ }
426
+
427
+ #if defined(PYBIND11_DETAILED_ERROR_MESSAGES)
428
+ pybind11_fail("pybind11::detail::instance::get_value_and_holder: `"
429
+ + get_fully_qualified_tp_name(find_type->type)
430
+ + "' is not a pybind11 base of the given `"
431
+ + get_fully_qualified_tp_name(Py_TYPE(this)) + "' instance");
432
+ #else
433
+ pybind11_fail(
434
+ "pybind11::detail::instance::get_value_and_holder: "
435
+ "type is not a pybind11 base of the given instance "
436
+ "(#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for type details)");
437
+ #endif
438
+ }
439
+
440
+ PYBIND11_NOINLINE void instance::allocate_layout() {
441
+ const auto &tinfo = all_type_info(Py_TYPE(this));
442
+
443
+ const size_t n_types = tinfo.size();
444
+
445
+ if (n_types == 0) {
446
+ pybind11_fail(
447
+ "instance allocation failed: new instance has no pybind11-registered base types");
448
+ }
449
+
450
+ simple_layout
451
+ = n_types == 1 && tinfo.front()->holder_size_in_ptrs <= instance_simple_holder_in_ptrs();
452
+
453
+ // Simple path: no python-side multiple inheritance, and a small-enough holder
454
+ if (simple_layout) {
455
+ simple_value_holder[0] = nullptr;
456
+ simple_holder_constructed = false;
457
+ simple_instance_registered = false;
458
+ } else { // multiple base types or a too-large holder
459
+ // Allocate space to hold: [v1*][h1][v2*][h2]...[bb...] where [vN*] is a value pointer,
460
+ // [hN] is the (uninitialized) holder instance for value N, and [bb...] is a set of bool
461
+ // values that tracks whether each associated holder has been initialized. Each [block] is
462
+ // padded, if necessary, to an integer multiple of sizeof(void *).
463
+ size_t space = 0;
464
+ for (auto *t : tinfo) {
465
+ space += 1; // value pointer
466
+ space += t->holder_size_in_ptrs; // holder instance
467
+ }
468
+ size_t flags_at = space;
469
+ space += size_in_ptrs(n_types); // status bytes (holder_constructed and
470
+ // instance_registered)
471
+
472
+ // Allocate space for flags, values, and holders, and initialize it to 0 (flags and values,
473
+ // in particular, need to be 0). Use Python's memory allocation
474
+ // functions: Python is using pymalloc, which is designed to be
475
+ // efficient for small allocations like the one we're doing here;
476
+ // for larger allocations they are just wrappers around malloc.
477
+ // TODO: is this still true for pure Python 3.6?
478
+ nonsimple.values_and_holders = (void **) PyMem_Calloc(space, sizeof(void *));
479
+ if (!nonsimple.values_and_holders) {
480
+ throw std::bad_alloc();
481
+ }
482
+ nonsimple.status
483
+ = reinterpret_cast<std::uint8_t *>(&nonsimple.values_and_holders[flags_at]);
484
+ }
485
+ owned = true;
486
+ }
487
+
488
+ // NOLINTNEXTLINE(readability-make-member-function-const)
489
+ PYBIND11_NOINLINE void instance::deallocate_layout() {
490
+ if (!simple_layout) {
491
+ PyMem_Free(nonsimple.values_and_holders);
492
+ }
493
+ }
494
+
495
+ PYBIND11_NOINLINE bool isinstance_generic(handle obj, const std::type_info &tp) {
496
+ handle type = detail::get_type_handle(tp, false);
497
+ if (!type) {
498
+ return false;
499
+ }
500
+ return isinstance(obj, type);
501
+ }
502
+
503
+ PYBIND11_NOINLINE handle get_object_handle(const void *ptr, const detail::type_info *type) {
504
+ return with_instance_map(ptr, [&](instance_map &instances) {
505
+ auto range = instances.equal_range(ptr);
506
+ for (auto it = range.first; it != range.second; ++it) {
507
+ for (const auto &vh : values_and_holders(it->second)) {
508
+ if (vh.type == type) {
509
+ return handle((PyObject *) it->second);
510
+ }
511
+ }
512
+ }
513
+ return handle();
514
+ });
515
+ }
516
+
517
+ inline PyThreadState *get_thread_state_unchecked() {
518
+ #if defined(PYPY_VERSION)
519
+ return PyThreadState_GET();
520
+ #elif PY_VERSION_HEX < 0x030D0000
521
+ return _PyThreadState_UncheckedGet();
522
+ #else
523
+ return PyThreadState_GetUnchecked();
524
+ #endif
525
+ }
526
+
527
+ // Forward declarations
528
+ void keep_alive_impl(handle nurse, handle patient);
529
+ inline PyObject *make_new_instance(PyTypeObject *type);
530
+
531
+ class type_caster_generic {
532
+ public:
533
+ PYBIND11_NOINLINE explicit type_caster_generic(const std::type_info &type_info)
534
+ : typeinfo(get_type_info(type_info)), cpptype(&type_info) {}
535
+
536
+ explicit type_caster_generic(const type_info *typeinfo)
537
+ : typeinfo(typeinfo), cpptype(typeinfo ? typeinfo->cpptype : nullptr) {}
538
+
539
+ bool load(handle src, bool convert) { return load_impl<type_caster_generic>(src, convert); }
540
+
541
+ PYBIND11_NOINLINE static handle cast(const void *_src,
542
+ return_value_policy policy,
543
+ handle parent,
544
+ const detail::type_info *tinfo,
545
+ void *(*copy_constructor)(const void *),
546
+ void *(*move_constructor)(const void *),
547
+ const void *existing_holder = nullptr) {
548
+ if (!tinfo) { // no type info: error will be set already
549
+ return handle();
550
+ }
551
+
552
+ void *src = const_cast<void *>(_src);
553
+ if (src == nullptr) {
554
+ return none().release();
555
+ }
556
+
557
+ if (handle registered_inst = find_registered_python_instance(src, tinfo)) {
558
+ return registered_inst;
559
+ }
560
+
561
+ auto inst = reinterpret_steal<object>(make_new_instance(tinfo->type));
562
+ auto *wrapper = reinterpret_cast<instance *>(inst.ptr());
563
+ wrapper->owned = false;
564
+ void *&valueptr = values_and_holders(wrapper).begin()->value_ptr();
565
+
566
+ switch (policy) {
567
+ case return_value_policy::automatic:
568
+ case return_value_policy::take_ownership:
569
+ valueptr = src;
570
+ wrapper->owned = true;
571
+ break;
572
+
573
+ case return_value_policy::automatic_reference:
574
+ case return_value_policy::reference:
575
+ valueptr = src;
576
+ wrapper->owned = false;
577
+ break;
578
+
579
+ case return_value_policy::copy:
580
+ if (copy_constructor) {
581
+ valueptr = copy_constructor(src);
582
+ } else {
583
+ #if defined(PYBIND11_DETAILED_ERROR_MESSAGES)
584
+ std::string type_name(tinfo->cpptype->name());
585
+ detail::clean_type_id(type_name);
586
+ throw cast_error("return_value_policy = copy, but type " + type_name
587
+ + " is non-copyable!");
588
+ #else
589
+ throw cast_error("return_value_policy = copy, but type is "
590
+ "non-copyable! (#define PYBIND11_DETAILED_ERROR_MESSAGES or "
591
+ "compile in debug mode for details)");
592
+ #endif
593
+ }
594
+ wrapper->owned = true;
595
+ break;
596
+
597
+ case return_value_policy::move:
598
+ if (move_constructor) {
599
+ valueptr = move_constructor(src);
600
+ } else if (copy_constructor) {
601
+ valueptr = copy_constructor(src);
602
+ } else {
603
+ #if defined(PYBIND11_DETAILED_ERROR_MESSAGES)
604
+ std::string type_name(tinfo->cpptype->name());
605
+ detail::clean_type_id(type_name);
606
+ throw cast_error("return_value_policy = move, but type " + type_name
607
+ + " is neither movable nor copyable!");
608
+ #else
609
+ throw cast_error("return_value_policy = move, but type is neither "
610
+ "movable nor copyable! "
611
+ "(#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in "
612
+ "debug mode for details)");
613
+ #endif
614
+ }
615
+ wrapper->owned = true;
616
+ break;
617
+
618
+ case return_value_policy::reference_internal:
619
+ valueptr = src;
620
+ wrapper->owned = false;
621
+ keep_alive_impl(inst, parent);
622
+ break;
623
+
624
+ default:
625
+ throw cast_error("unhandled return_value_policy: should not happen!");
626
+ }
627
+
628
+ tinfo->init_instance(wrapper, existing_holder);
629
+
630
+ return inst.release();
631
+ }
632
+
633
+ // Base methods for generic caster; there are overridden in copyable_holder_caster
634
+ void load_value(value_and_holder &&v_h) {
635
+ auto *&vptr = v_h.value_ptr();
636
+ // Lazy allocation for unallocated values:
637
+ if (vptr == nullptr) {
638
+ const auto *type = v_h.type ? v_h.type : typeinfo;
639
+ if (type->operator_new) {
640
+ vptr = type->operator_new(type->type_size);
641
+ } else {
642
+ #if defined(__cpp_aligned_new) && (!defined(_MSC_VER) || _MSC_VER >= 1912)
643
+ if (type->type_align > __STDCPP_DEFAULT_NEW_ALIGNMENT__) {
644
+ vptr = ::operator new(type->type_size, std::align_val_t(type->type_align));
645
+ } else {
646
+ vptr = ::operator new(type->type_size);
647
+ }
648
+ #else
649
+ vptr = ::operator new(type->type_size);
650
+ #endif
651
+ }
652
+ }
653
+ value = vptr;
654
+ }
655
+ bool try_implicit_casts(handle src, bool convert) {
656
+ for (const auto &cast : typeinfo->implicit_casts) {
657
+ type_caster_generic sub_caster(*cast.first);
658
+ if (sub_caster.load(src, convert)) {
659
+ value = cast.second(sub_caster.value);
660
+ return true;
661
+ }
662
+ }
663
+ return false;
664
+ }
665
+ bool try_direct_conversions(handle src) {
666
+ for (auto &converter : *typeinfo->direct_conversions) {
667
+ if (converter(src.ptr(), value)) {
668
+ return true;
669
+ }
670
+ }
671
+ return false;
672
+ }
673
+ void check_holder_compat() {}
674
+
675
+ PYBIND11_NOINLINE static void *local_load(PyObject *src, const type_info *ti) {
676
+ auto caster = type_caster_generic(ti);
677
+ if (caster.load(src, false)) {
678
+ return caster.value;
679
+ }
680
+ return nullptr;
681
+ }
682
+
683
+ /// Try to load with foreign typeinfo, if available. Used when there is no
684
+ /// native typeinfo, or when the native one wasn't able to produce a value.
685
+ PYBIND11_NOINLINE bool try_load_foreign_module_local(handle src) {
686
+ constexpr auto *local_key = PYBIND11_MODULE_LOCAL_ID;
687
+ const auto pytype = type::handle_of(src);
688
+ if (!hasattr(pytype, local_key)) {
689
+ return false;
690
+ }
691
+
692
+ type_info *foreign_typeinfo = reinterpret_borrow<capsule>(getattr(pytype, local_key));
693
+ // Only consider this foreign loader if actually foreign and is a loader of the correct cpp
694
+ // type
695
+ if (foreign_typeinfo->module_local_load == &local_load
696
+ || (cpptype && !same_type(*cpptype, *foreign_typeinfo->cpptype))) {
697
+ return false;
698
+ }
699
+
700
+ if (auto *result = foreign_typeinfo->module_local_load(src.ptr(), foreign_typeinfo)) {
701
+ value = result;
702
+ return true;
703
+ }
704
+ return false;
705
+ }
706
+
707
+ // Implementation of `load`; this takes the type of `this` so that it can dispatch the relevant
708
+ // bits of code between here and copyable_holder_caster where the two classes need different
709
+ // logic (without having to resort to virtual inheritance).
710
+ template <typename ThisT>
711
+ PYBIND11_NOINLINE bool load_impl(handle src, bool convert) {
712
+ if (!src) {
713
+ return false;
714
+ }
715
+ if (!typeinfo) {
716
+ return try_load_foreign_module_local(src);
717
+ }
718
+
719
+ auto &this_ = static_cast<ThisT &>(*this);
720
+ this_.check_holder_compat();
721
+
722
+ PyTypeObject *srctype = Py_TYPE(src.ptr());
723
+
724
+ // Case 1: If src is an exact type match for the target type then we can reinterpret_cast
725
+ // the instance's value pointer to the target type:
726
+ if (srctype == typeinfo->type) {
727
+ this_.load_value(reinterpret_cast<instance *>(src.ptr())->get_value_and_holder());
728
+ return true;
729
+ }
730
+ // Case 2: We have a derived class
731
+ if (PyType_IsSubtype(srctype, typeinfo->type)) {
732
+ const auto &bases = all_type_info(srctype);
733
+ bool no_cpp_mi = typeinfo->simple_type;
734
+
735
+ // Case 2a: the python type is a Python-inherited derived class that inherits from just
736
+ // one simple (no MI) pybind11 class, or is an exact match, so the C++ instance is of
737
+ // the right type and we can use reinterpret_cast.
738
+ // (This is essentially the same as case 2b, but because not using multiple inheritance
739
+ // is extremely common, we handle it specially to avoid the loop iterator and type
740
+ // pointer lookup overhead)
741
+ if (bases.size() == 1 && (no_cpp_mi || bases.front()->type == typeinfo->type)) {
742
+ this_.load_value(reinterpret_cast<instance *>(src.ptr())->get_value_and_holder());
743
+ return true;
744
+ }
745
+ // Case 2b: the python type inherits from multiple C++ bases. Check the bases to see
746
+ // if we can find an exact match (or, for a simple C++ type, an inherited match); if
747
+ // so, we can safely reinterpret_cast to the relevant pointer.
748
+ if (bases.size() > 1) {
749
+ for (auto *base : bases) {
750
+ if (no_cpp_mi ? PyType_IsSubtype(base->type, typeinfo->type)
751
+ : base->type == typeinfo->type) {
752
+ this_.load_value(
753
+ reinterpret_cast<instance *>(src.ptr())->get_value_and_holder(base));
754
+ return true;
755
+ }
756
+ }
757
+ }
758
+
759
+ // Case 2c: C++ multiple inheritance is involved and we couldn't find an exact type
760
+ // match in the registered bases, above, so try implicit casting (needed for proper C++
761
+ // casting when MI is involved).
762
+ if (this_.try_implicit_casts(src, convert)) {
763
+ return true;
764
+ }
765
+ }
766
+
767
+ // Perform an implicit conversion
768
+ if (convert) {
769
+ for (const auto &converter : typeinfo->implicit_conversions) {
770
+ auto temp = reinterpret_steal<object>(converter(src.ptr(), typeinfo->type));
771
+ if (load_impl<ThisT>(temp, false)) {
772
+ loader_life_support::add_patient(temp);
773
+ return true;
774
+ }
775
+ }
776
+ if (this_.try_direct_conversions(src)) {
777
+ return true;
778
+ }
779
+ }
780
+
781
+ // Failed to match local typeinfo. Try again with global.
782
+ if (typeinfo->module_local) {
783
+ if (auto *gtype = get_global_type_info(*typeinfo->cpptype)) {
784
+ typeinfo = gtype;
785
+ return load(src, false);
786
+ }
787
+ }
788
+
789
+ // Global typeinfo has precedence over foreign module_local
790
+ if (try_load_foreign_module_local(src)) {
791
+ return true;
792
+ }
793
+
794
+ // Custom converters didn't take None, now we convert None to nullptr.
795
+ if (src.is_none()) {
796
+ // Defer accepting None to other overloads (if we aren't in convert mode):
797
+ if (!convert) {
798
+ return false;
799
+ }
800
+ value = nullptr;
801
+ return true;
802
+ }
803
+
804
+ return false;
805
+ }
806
+
807
+ // Called to do type lookup and wrap the pointer and type in a pair when a dynamic_cast
808
+ // isn't needed or can't be used. If the type is unknown, sets the error and returns a pair
809
+ // with .second = nullptr. (p.first = nullptr is not an error: it becomes None).
810
+ PYBIND11_NOINLINE static std::pair<const void *, const type_info *>
811
+ src_and_type(const void *src,
812
+ const std::type_info &cast_type,
813
+ const std::type_info *rtti_type = nullptr) {
814
+ if (auto *tpi = get_type_info(cast_type)) {
815
+ return {src, const_cast<const type_info *>(tpi)};
816
+ }
817
+
818
+ // Not found, set error:
819
+ std::string tname = rtti_type ? rtti_type->name() : cast_type.name();
820
+ detail::clean_type_id(tname);
821
+ std::string msg = "Unregistered type : " + tname;
822
+ set_error(PyExc_TypeError, msg.c_str());
823
+ return {nullptr, nullptr};
824
+ }
825
+
826
+ const type_info *typeinfo = nullptr;
827
+ const std::type_info *cpptype = nullptr;
828
+ void *value = nullptr;
829
+ };
830
+
831
+ /**
832
+ * Determine suitable casting operator for pointer-or-lvalue-casting type casters. The type caster
833
+ * needs to provide `operator T*()` and `operator T&()` operators.
834
+ *
835
+ * If the type supports moving the value away via an `operator T&&() &&` method, it should use
836
+ * `movable_cast_op_type` instead.
837
+ */
838
+ template <typename T>
839
+ using cast_op_type = conditional_t<std::is_pointer<remove_reference_t<T>>::value,
840
+ typename std::add_pointer<intrinsic_t<T>>::type,
841
+ typename std::add_lvalue_reference<intrinsic_t<T>>::type>;
842
+
843
+ /**
844
+ * Determine suitable casting operator for a type caster with a movable value. Such a type caster
845
+ * needs to provide `operator T*()`, `operator T&()`, and `operator T&&() &&`. The latter will be
846
+ * called in appropriate contexts where the value can be moved rather than copied.
847
+ *
848
+ * These operator are automatically provided when using the PYBIND11_TYPE_CASTER macro.
849
+ */
850
+ template <typename T>
851
+ using movable_cast_op_type
852
+ = conditional_t<std::is_pointer<typename std::remove_reference<T>::type>::value,
853
+ typename std::add_pointer<intrinsic_t<T>>::type,
854
+ conditional_t<std::is_rvalue_reference<T>::value,
855
+ typename std::add_rvalue_reference<intrinsic_t<T>>::type,
856
+ typename std::add_lvalue_reference<intrinsic_t<T>>::type>>;
857
+
858
+ // Does the container have a mapped type and is it recursive?
859
+ // Implemented by specializations below.
860
+ template <typename Container, typename SFINAE = void>
861
+ struct container_mapped_type_traits {
862
+ static constexpr bool has_mapped_type = false;
863
+ static constexpr bool has_recursive_mapped_type = false;
864
+ };
865
+
866
+ template <typename Container>
867
+ struct container_mapped_type_traits<
868
+ Container,
869
+ typename std::enable_if<
870
+ std::is_same<typename Container::mapped_type, Container>::value>::type> {
871
+ static constexpr bool has_mapped_type = true;
872
+ static constexpr bool has_recursive_mapped_type = true;
873
+ };
874
+
875
+ template <typename Container>
876
+ struct container_mapped_type_traits<
877
+ Container,
878
+ typename std::enable_if<
879
+ negation<std::is_same<typename Container::mapped_type, Container>>::value>::type> {
880
+ static constexpr bool has_mapped_type = true;
881
+ static constexpr bool has_recursive_mapped_type = false;
882
+ };
883
+
884
+ // Does the container have a value type and is it recursive?
885
+ // Implemented by specializations below.
886
+ template <typename Container, typename SFINAE = void>
887
+ struct container_value_type_traits : std::false_type {
888
+ static constexpr bool has_value_type = false;
889
+ static constexpr bool has_recursive_value_type = false;
890
+ };
891
+
892
+ template <typename Container>
893
+ struct container_value_type_traits<
894
+ Container,
895
+ typename std::enable_if<
896
+ std::is_same<typename Container::value_type, Container>::value>::type> {
897
+ static constexpr bool has_value_type = true;
898
+ static constexpr bool has_recursive_value_type = true;
899
+ };
900
+
901
+ template <typename Container>
902
+ struct container_value_type_traits<
903
+ Container,
904
+ typename std::enable_if<
905
+ negation<std::is_same<typename Container::value_type, Container>>::value>::type> {
906
+ static constexpr bool has_value_type = true;
907
+ static constexpr bool has_recursive_value_type = false;
908
+ };
909
+
910
+ /*
911
+ * Tag to be used for representing the bottom of recursively defined types.
912
+ * Define this tag so we don't have to use void.
913
+ */
914
+ struct recursive_bottom {};
915
+
916
+ /*
917
+ * Implementation detail of `recursive_container_traits` below.
918
+ * `T` is the `value_type` of the container, which might need to be modified to
919
+ * avoid recursive types and const types.
920
+ */
921
+ template <typename T, bool is_this_a_map>
922
+ struct impl_type_to_check_recursively {
923
+ /*
924
+ * If the container is recursive, then no further recursion should be done.
925
+ */
926
+ using if_recursive = recursive_bottom;
927
+ /*
928
+ * Otherwise yield `T` unchanged.
929
+ */
930
+ using if_not_recursive = T;
931
+ };
932
+
933
+ /*
934
+ * For pairs - only as value type of a map -, the first type should remove the `const`.
935
+ * Also, if the map is recursive, then the recursive checking should consider
936
+ * the first type only.
937
+ */
938
+ template <typename A, typename B>
939
+ struct impl_type_to_check_recursively<std::pair<A, B>, /* is_this_a_map = */ true> {
940
+ using if_recursive = typename std::remove_const<A>::type;
941
+ using if_not_recursive = std::pair<typename std::remove_const<A>::type, B>;
942
+ };
943
+
944
+ /*
945
+ * Implementation of `recursive_container_traits` below.
946
+ */
947
+ template <typename Container, typename SFINAE = void>
948
+ struct impl_recursive_container_traits {
949
+ using type_to_check_recursively = recursive_bottom;
950
+ };
951
+
952
+ template <typename Container>
953
+ struct impl_recursive_container_traits<
954
+ Container,
955
+ typename std::enable_if<container_value_type_traits<Container>::has_value_type>::type> {
956
+ static constexpr bool is_recursive
957
+ = container_mapped_type_traits<Container>::has_recursive_mapped_type
958
+ || container_value_type_traits<Container>::has_recursive_value_type;
959
+ /*
960
+ * This member dictates which type Pybind11 should check recursively in traits
961
+ * such as `is_move_constructible`, `is_copy_constructible`, `is_move_assignable`, ...
962
+ * Direct access to `value_type` should be avoided:
963
+ * 1. `value_type` might recursively contain the type again
964
+ * 2. `value_type` of STL map types is `std::pair<A const, B>`, the `const`
965
+ * should be removed.
966
+ *
967
+ */
968
+ using type_to_check_recursively = typename std::conditional<
969
+ is_recursive,
970
+ typename impl_type_to_check_recursively<
971
+ typename Container::value_type,
972
+ container_mapped_type_traits<Container>::has_mapped_type>::if_recursive,
973
+ typename impl_type_to_check_recursively<
974
+ typename Container::value_type,
975
+ container_mapped_type_traits<Container>::has_mapped_type>::if_not_recursive>::type;
976
+ };
977
+
978
+ /*
979
+ * This trait defines the `type_to_check_recursively` which is needed to properly
980
+ * handle recursively defined traits such as `is_move_constructible` without going
981
+ * into an infinite recursion.
982
+ * Should be used instead of directly accessing the `value_type`.
983
+ * It cancels the recursion by returning the `recursive_bottom` tag.
984
+ *
985
+ * The default definition of `type_to_check_recursively` is as follows:
986
+ *
987
+ * 1. By default, it is `recursive_bottom`, so that the recursion is canceled.
988
+ * 2. If the type is non-recursive and defines a `value_type`, then the `value_type` is used.
989
+ * If the `value_type` is a pair and a `mapped_type` is defined,
990
+ * then the `const` is removed from the first type.
991
+ * 3. If the type is recursive and `value_type` is not a pair, then `recursive_bottom` is returned.
992
+ * 4. If the type is recursive and `value_type` is a pair and a `mapped_type` is defined,
993
+ * then `const` is removed from the first type and the first type is returned.
994
+ *
995
+ * This behavior can be extended by the user as seen in test_stl_binders.cpp.
996
+ *
997
+ * This struct is exactly the same as impl_recursive_container_traits.
998
+ * The duplication achieves that user-defined specializations don't compete
999
+ * with internal specializations, but take precedence.
1000
+ */
1001
+ template <typename Container, typename SFINAE = void>
1002
+ struct recursive_container_traits : impl_recursive_container_traits<Container> {};
1003
+
1004
+ template <typename T>
1005
+ struct is_move_constructible
1006
+ : all_of<std::is_move_constructible<T>,
1007
+ is_move_constructible<
1008
+ typename recursive_container_traits<T>::type_to_check_recursively>> {};
1009
+
1010
+ template <>
1011
+ struct is_move_constructible<recursive_bottom> : std::true_type {};
1012
+
1013
+ // Likewise for std::pair
1014
+ // (after C++17 it is mandatory that the move constructor not exist when the two types aren't
1015
+ // themselves move constructible, but this can not be relied upon when T1 or T2 are themselves
1016
+ // containers).
1017
+ template <typename T1, typename T2>
1018
+ struct is_move_constructible<std::pair<T1, T2>>
1019
+ : all_of<is_move_constructible<T1>, is_move_constructible<T2>> {};
1020
+
1021
+ // std::is_copy_constructible isn't quite enough: it lets std::vector<T> (and similar) through when
1022
+ // T is non-copyable, but code containing such a copy constructor fails to actually compile.
1023
+ template <typename T>
1024
+ struct is_copy_constructible
1025
+ : all_of<std::is_copy_constructible<T>,
1026
+ is_copy_constructible<
1027
+ typename recursive_container_traits<T>::type_to_check_recursively>> {};
1028
+
1029
+ template <>
1030
+ struct is_copy_constructible<recursive_bottom> : std::true_type {};
1031
+
1032
+ // Likewise for std::pair
1033
+ // (after C++17 it is mandatory that the copy constructor not exist when the two types aren't
1034
+ // themselves copy constructible, but this can not be relied upon when T1 or T2 are themselves
1035
+ // containers).
1036
+ template <typename T1, typename T2>
1037
+ struct is_copy_constructible<std::pair<T1, T2>>
1038
+ : all_of<is_copy_constructible<T1>, is_copy_constructible<T2>> {};
1039
+
1040
+ // The same problems arise with std::is_copy_assignable, so we use the same workaround.
1041
+ template <typename T>
1042
+ struct is_copy_assignable
1043
+ : all_of<
1044
+ std::is_copy_assignable<T>,
1045
+ is_copy_assignable<typename recursive_container_traits<T>::type_to_check_recursively>> {
1046
+ };
1047
+
1048
+ template <>
1049
+ struct is_copy_assignable<recursive_bottom> : std::true_type {};
1050
+
1051
+ template <typename T1, typename T2>
1052
+ struct is_copy_assignable<std::pair<T1, T2>>
1053
+ : all_of<is_copy_assignable<T1>, is_copy_assignable<T2>> {};
1054
+
1055
+ PYBIND11_NAMESPACE_END(detail)
1056
+
1057
+ // polymorphic_type_hook<itype>::get(src, tinfo) determines whether the object pointed
1058
+ // to by `src` actually is an instance of some class derived from `itype`.
1059
+ // If so, it sets `tinfo` to point to the std::type_info representing that derived
1060
+ // type, and returns a pointer to the start of the most-derived object of that type
1061
+ // (in which `src` is a subobject; this will be the same address as `src` in most
1062
+ // single inheritance cases). If not, or if `src` is nullptr, it simply returns `src`
1063
+ // and leaves `tinfo` at its default value of nullptr.
1064
+ //
1065
+ // The default polymorphic_type_hook just returns src. A specialization for polymorphic
1066
+ // types determines the runtime type of the passed object and adjusts the this-pointer
1067
+ // appropriately via dynamic_cast<void*>. This is what enables a C++ Animal* to appear
1068
+ // to Python as a Dog (if Dog inherits from Animal, Animal is polymorphic, Dog is
1069
+ // registered with pybind11, and this Animal is in fact a Dog).
1070
+ //
1071
+ // You may specialize polymorphic_type_hook yourself for types that want to appear
1072
+ // polymorphic to Python but do not use C++ RTTI. (This is a not uncommon pattern
1073
+ // in performance-sensitive applications, used most notably in LLVM.)
1074
+ //
1075
+ // polymorphic_type_hook_base allows users to specialize polymorphic_type_hook with
1076
+ // std::enable_if. User provided specializations will always have higher priority than
1077
+ // the default implementation and specialization provided in polymorphic_type_hook_base.
1078
+ template <typename itype, typename SFINAE = void>
1079
+ struct polymorphic_type_hook_base {
1080
+ static const void *get(const itype *src, const std::type_info *&) { return src; }
1081
+ };
1082
+ template <typename itype>
1083
+ struct polymorphic_type_hook_base<itype, detail::enable_if_t<std::is_polymorphic<itype>::value>> {
1084
+ static const void *get(const itype *src, const std::type_info *&type) {
1085
+ type = src ? &typeid(*src) : nullptr;
1086
+ return dynamic_cast<const void *>(src);
1087
+ }
1088
+ };
1089
+ template <typename itype, typename SFINAE = void>
1090
+ struct polymorphic_type_hook : public polymorphic_type_hook_base<itype> {};
1091
+
1092
+ PYBIND11_NAMESPACE_BEGIN(detail)
1093
+
1094
+ /// Generic type caster for objects stored on the heap
1095
+ template <typename type>
1096
+ class type_caster_base : public type_caster_generic {
1097
+ using itype = intrinsic_t<type>;
1098
+
1099
+ public:
1100
+ static constexpr auto name = const_name<type>();
1101
+
1102
+ type_caster_base() : type_caster_base(typeid(type)) {}
1103
+ explicit type_caster_base(const std::type_info &info) : type_caster_generic(info) {}
1104
+
1105
+ static handle cast(const itype &src, return_value_policy policy, handle parent) {
1106
+ if (policy == return_value_policy::automatic
1107
+ || policy == return_value_policy::automatic_reference) {
1108
+ policy = return_value_policy::copy;
1109
+ }
1110
+ return cast(std::addressof(src), policy, parent);
1111
+ }
1112
+
1113
+ static handle cast(itype &&src, return_value_policy, handle parent) {
1114
+ return cast(std::addressof(src), return_value_policy::move, parent);
1115
+ }
1116
+
1117
+ // Returns a (pointer, type_info) pair taking care of necessary type lookup for a
1118
+ // polymorphic type (using RTTI by default, but can be overridden by specializing
1119
+ // polymorphic_type_hook). If the instance isn't derived, returns the base version.
1120
+ static std::pair<const void *, const type_info *> src_and_type(const itype *src) {
1121
+ const auto &cast_type = typeid(itype);
1122
+ const std::type_info *instance_type = nullptr;
1123
+ const void *vsrc = polymorphic_type_hook<itype>::get(src, instance_type);
1124
+ if (instance_type && !same_type(cast_type, *instance_type)) {
1125
+ // This is a base pointer to a derived type. If the derived type is registered
1126
+ // with pybind11, we want to make the full derived object available.
1127
+ // In the typical case where itype is polymorphic, we get the correct
1128
+ // derived pointer (which may be != base pointer) by a dynamic_cast to
1129
+ // most derived type. If itype is not polymorphic, we won't get here
1130
+ // except via a user-provided specialization of polymorphic_type_hook,
1131
+ // and the user has promised that no this-pointer adjustment is
1132
+ // required in that case, so it's OK to use static_cast.
1133
+ if (const auto *tpi = get_type_info(*instance_type)) {
1134
+ return {vsrc, tpi};
1135
+ }
1136
+ }
1137
+ // Otherwise we have either a nullptr, an `itype` pointer, or an unknown derived pointer,
1138
+ // so don't do a cast
1139
+ return type_caster_generic::src_and_type(src, cast_type, instance_type);
1140
+ }
1141
+
1142
+ static handle cast(const itype *src, return_value_policy policy, handle parent) {
1143
+ auto st = src_and_type(src);
1144
+ return type_caster_generic::cast(st.first,
1145
+ policy,
1146
+ parent,
1147
+ st.second,
1148
+ make_copy_constructor(src),
1149
+ make_move_constructor(src));
1150
+ }
1151
+
1152
+ static handle cast_holder(const itype *src, const void *holder) {
1153
+ auto st = src_and_type(src);
1154
+ return type_caster_generic::cast(st.first,
1155
+ return_value_policy::take_ownership,
1156
+ {},
1157
+ st.second,
1158
+ nullptr,
1159
+ nullptr,
1160
+ holder);
1161
+ }
1162
+
1163
+ template <typename T>
1164
+ using cast_op_type = detail::cast_op_type<T>;
1165
+
1166
+ // NOLINTNEXTLINE(google-explicit-constructor)
1167
+ operator itype *() { return (type *) value; }
1168
+ // NOLINTNEXTLINE(google-explicit-constructor)
1169
+ operator itype &() {
1170
+ if (!value) {
1171
+ throw reference_cast_error();
1172
+ }
1173
+ return *((itype *) value);
1174
+ }
1175
+
1176
+ protected:
1177
+ using Constructor = void *(*) (const void *);
1178
+
1179
+ /* Only enabled when the types are {copy,move}-constructible *and* when the type
1180
+ does not have a private operator new implementation. A comma operator is used in the
1181
+ decltype argument to apply SFINAE to the public copy/move constructors.*/
1182
+ template <typename T, typename = enable_if_t<is_copy_constructible<T>::value>>
1183
+ static auto make_copy_constructor(const T *) -> decltype(new T(std::declval<const T>()),
1184
+ Constructor{}) {
1185
+ return [](const void *arg) -> void * { return new T(*reinterpret_cast<const T *>(arg)); };
1186
+ }
1187
+
1188
+ template <typename T, typename = enable_if_t<is_move_constructible<T>::value>>
1189
+ static auto make_move_constructor(const T *) -> decltype(new T(std::declval<T &&>()),
1190
+ Constructor{}) {
1191
+ return [](const void *arg) -> void * {
1192
+ return new T(std::move(*const_cast<T *>(reinterpret_cast<const T *>(arg))));
1193
+ };
1194
+ }
1195
+
1196
+ static Constructor make_copy_constructor(...) { return nullptr; }
1197
+ static Constructor make_move_constructor(...) { return nullptr; }
1198
+ };
1199
+
1200
+ inline std::string quote_cpp_type_name(const std::string &cpp_type_name) {
1201
+ return cpp_type_name; // No-op for now. See PR #4888
1202
+ }
1203
+
1204
+ PYBIND11_NOINLINE std::string type_info_description(const std::type_info &ti) {
1205
+ if (auto *type_data = get_type_info(ti)) {
1206
+ handle th((PyObject *) type_data->type);
1207
+ return th.attr("__module__").cast<std::string>() + '.'
1208
+ + th.attr("__qualname__").cast<std::string>();
1209
+ }
1210
+ return quote_cpp_type_name(clean_type_id(ti.name()));
1211
+ }
1212
+
1213
+ PYBIND11_NAMESPACE_END(detail)
1214
+ PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)