FfiGenerator class final

The generator that generates bindings for dart:ffi from C and Objective-C headers.

Constructors

FfiGenerator({Headers headers = const Headers(), Enums enums = Enums.excludeAll, Functions functions = Functions.excludeAll, Globals globals = Globals.excludeAll, Integers integers = const Integers(), Macros macros = Macros.excludeAll, Structs structs = Structs.excludeAll, Typedefs typedefs = Typedefs.excludeAll, Unions unions = Unions.excludeAll, UnnamedEnums unnamedEnums = UnnamedEnums.excludeAll, ObjectiveC? objectiveC, required Output output, @Deprecated('Will be folded into imported fields of the various declarations. See ' 'https://github.com/dart-lang/native/issues/2596.') Map<String, ImportedType> importedTypesByUsr = const <String, ImportedType>{}, @Deprecated('In the future, this shoud be inferred from ImportedTypes. See ' 'https://github.com/dart-lang/native/issues/2597.') List<LibraryImport> libraryImports = const <LibraryImport>[], @Deprecated('Will be removed in a future version. Please reply in ' 'https://github.com/dart-lang/native/issues/2594 if you rely on this.') bool useDartHandle = true, @Deprecated('Only visible for YamlConfig plumbing.') Uri? libclangDylib})
const

Properties

enums Enums
Configuration for enums.
final
functions Functions
Configuration for functions.
final
globals Globals
Configuration for globals.
final
hashCode int
The hash code for this object.
no setterinherited
headers Headers
The configuration for header parsing of FfiGenerator.
final
importedTypesByUsr Map<String, ImportedType>
Types imported from other Dart files, specified via the unique-resource-identifer used in Clang.
final
integers Integers
Configuration for integer types.
final
libclangDylib Uri?
Path to the clang library.
final
libraryImports List<LibraryImport>
Stores all the library imports specified by user including those for ffi and pkg_ffi.
final
macros Macros
Configuration for macro constants.
final
objectiveC ObjectiveC?
Objective-C specific configuration.
final
output Output
The configuration for outputting bindings.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
structs Structs
Configuration for structs.
final
typedefs Typedefs
Configuration for typedefs.
final
unions Unions
Configuration for unions.
final
unnamedEnums UnnamedEnums
Configuration for unnamed enum constants.
final
useDartHandle bool
Whether Dart_Handle should be mapped with Handle/Object.
final

Methods

generate({Logger? logger, Uri? libclangDylib}) → void
Run this generator.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited