|
| 1 | + |
| 2 | + |
| 3 | +import 'dart:ffi'; |
| 4 | +import 'package:library/src/_library_context.dart' as __lib; |
| 5 | +import 'package:library/src/_native_base.dart' as __lib; |
| 6 | +import 'package:library/src/_token_cache.dart' as __lib; |
| 7 | +import 'package:library/src/generic_types__conversion.dart'; |
| 8 | + |
| 9 | +/// @nodoc |
| 10 | +abstract class DartInternalClassWithInternalTypedef implements Finalizable { |
| 11 | + |
| 12 | + DartInternalClassWithInternalTypedef_SomeStringToIntMap get numbers; |
| 13 | + set numbers(DartInternalClassWithInternalTypedef_SomeStringToIntMap value); |
| 14 | + |
| 15 | + DartInternalClassWithInternalTypedef_SomeStringArray get labels; |
| 16 | + set labels(DartInternalClassWithInternalTypedef_SomeStringArray value); |
| 17 | + |
| 18 | +} |
| 19 | + |
| 20 | +/// @nodoc |
| 21 | +typedef _DartInternalClassWithInternalTypedef_SomeStringToIntMap = Map<String, int>; |
| 22 | +/// @nodoc |
| 23 | +typedef _DartInternalClassWithInternalTypedef_SomeStringArray = List<String>; |
| 24 | + |
| 25 | +// DartInternalClassWithInternalTypedef "private" section, not exported. |
| 26 | + |
| 27 | +final _smokeDartinternalclasswithinternaltypedefRegisterFinalizer = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< |
| 28 | + Void Function(Pointer<Void>, Int32, Handle), |
| 29 | + void Function(Pointer<Void>, int, Object) |
| 30 | + >('library_smoke_DartInternalClassWithInternalTypedef_register_finalizer')); |
| 31 | +final _smokeDartinternalclasswithinternaltypedefCopyHandle = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< |
| 32 | + Pointer<Void> Function(Pointer<Void>), |
| 33 | + Pointer<Void> Function(Pointer<Void>) |
| 34 | + >('library_smoke_DartInternalClassWithInternalTypedef_copy_handle')); |
| 35 | +final _smokeDartinternalclasswithinternaltypedefReleaseHandle = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< |
| 36 | + Void Function(Pointer<Void>), |
| 37 | + void Function(Pointer<Void>) |
| 38 | + >('library_smoke_DartInternalClassWithInternalTypedef_release_handle')); |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +class DartInternalClassWithInternalTypedef$Impl extends __lib.NativeBase implements DartInternalClassWithInternalTypedef { |
| 43 | + |
| 44 | + DartInternalClassWithInternalTypedef$Impl(Pointer<Void> handle) : super(handle); |
| 45 | + |
| 46 | + @override |
| 47 | + DartInternalClassWithInternalTypedef_SomeStringToIntMap get numbers { |
| 48 | + final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Pointer<Void> Function(Pointer<Void>, Int32), Pointer<Void> Function(Pointer<Void>, int)>('library_smoke_DartInternalClassWithInternalTypedef_numbers_get')); |
| 49 | + final _handle = this.handle; |
| 50 | + final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); |
| 51 | + try { |
| 52 | + return foobarMapofStringToIntFromFfi(__resultHandle); |
| 53 | + } finally { |
| 54 | + foobarMapofStringToIntReleaseFfiHandle(__resultHandle); |
| 55 | + |
| 56 | + } |
| 57 | + |
| 58 | + } |
| 59 | + |
| 60 | + @override |
| 61 | + set numbers(DartInternalClassWithInternalTypedef_SomeStringToIntMap value) { |
| 62 | + final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Void Function(Pointer<Void>, Int32, Pointer<Void>), void Function(Pointer<Void>, int, Pointer<Void>)>('library_smoke_DartInternalClassWithInternalTypedef_numbers_set__MapOf_String_to_Int')); |
| 63 | + final _valueHandle = foobarMapofStringToIntToFfi(value); |
| 64 | + final _handle = this.handle; |
| 65 | + _setFfi(_handle, __lib.LibraryContext.isolateId, _valueHandle); |
| 66 | + foobarMapofStringToIntReleaseFfiHandle(_valueHandle); |
| 67 | + |
| 68 | + } |
| 69 | + |
| 70 | + |
| 71 | + @override |
| 72 | + DartInternalClassWithInternalTypedef_SomeStringArray get labels { |
| 73 | + final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Pointer<Void> Function(Pointer<Void>, Int32), Pointer<Void> Function(Pointer<Void>, int)>('library_smoke_DartInternalClassWithInternalTypedef_labels_get')); |
| 74 | + final _handle = this.handle; |
| 75 | + final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); |
| 76 | + try { |
| 77 | + return foobarListofStringFromFfi(__resultHandle); |
| 78 | + } finally { |
| 79 | + foobarListofStringReleaseFfiHandle(__resultHandle); |
| 80 | + |
| 81 | + } |
| 82 | + |
| 83 | + } |
| 84 | + |
| 85 | + @override |
| 86 | + set labels(DartInternalClassWithInternalTypedef_SomeStringArray value) { |
| 87 | + final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Void Function(Pointer<Void>, Int32, Pointer<Void>), void Function(Pointer<Void>, int, Pointer<Void>)>('library_smoke_DartInternalClassWithInternalTypedef_labels_set__ListOf_String')); |
| 88 | + final _valueHandle = foobarListofStringToFfi(value); |
| 89 | + final _handle = this.handle; |
| 90 | + _setFfi(_handle, __lib.LibraryContext.isolateId, _valueHandle); |
| 91 | + foobarListofStringReleaseFfiHandle(_valueHandle); |
| 92 | + |
| 93 | + } |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | +} |
| 98 | + |
| 99 | +Pointer<Void> smokeDartinternalclasswithinternaltypedefToFfi(DartInternalClassWithInternalTypedef value) => |
| 100 | + _smokeDartinternalclasswithinternaltypedefCopyHandle((value as __lib.NativeBase).handle); |
| 101 | + |
| 102 | +DartInternalClassWithInternalTypedef smokeDartinternalclasswithinternaltypedefFromFfi(Pointer<Void> handle) { |
| 103 | + if (handle.address == 0) throw StateError("Expected non-null value."); |
| 104 | + final instance = __lib.getCachedInstance(handle); |
| 105 | + if (instance != null && instance is DartInternalClassWithInternalTypedef) return instance; |
| 106 | + |
| 107 | + final _copiedHandle = _smokeDartinternalclasswithinternaltypedefCopyHandle(handle); |
| 108 | + final result = DartInternalClassWithInternalTypedef$Impl(_copiedHandle); |
| 109 | + __lib.cacheInstance(_copiedHandle, result); |
| 110 | + _smokeDartinternalclasswithinternaltypedefRegisterFinalizer(_copiedHandle, __lib.LibraryContext.isolateId, result); |
| 111 | + return result; |
| 112 | +} |
| 113 | + |
| 114 | +void smokeDartinternalclasswithinternaltypedefReleaseFfiHandle(Pointer<Void> handle) => |
| 115 | + _smokeDartinternalclasswithinternaltypedefReleaseHandle(handle); |
| 116 | + |
| 117 | +Pointer<Void> smokeDartinternalclasswithinternaltypedefToFfiNullable(DartInternalClassWithInternalTypedef? value) => |
| 118 | + value != null ? smokeDartinternalclasswithinternaltypedefToFfi(value) : Pointer<Void>.fromAddress(0); |
| 119 | + |
| 120 | +DartInternalClassWithInternalTypedef? smokeDartinternalclasswithinternaltypedefFromFfiNullable(Pointer<Void> handle) => |
| 121 | + handle.address != 0 ? smokeDartinternalclasswithinternaltypedefFromFfi(handle) : null; |
| 122 | + |
| 123 | +void smokeDartinternalclasswithinternaltypedefReleaseFfiHandleNullable(Pointer<Void> handle) => |
| 124 | + _smokeDartinternalclasswithinternaltypedefReleaseHandle(handle); |
| 125 | + |
| 126 | +// End of DartInternalClassWithInternalTypedef "private" section. |
| 127 | + |
| 128 | + |
0 commit comments