Provides configurations to other modules.
- Implementers
Constructors
-
Config.new({Uri? filename, PackageConfig? packageConfig, Uri? libclangDylib, required Uri output, Uri? outputObjC, SymbolFile? symbolFile, Language language = Language.c, required List<
Uri> entryPoints, bool shouldIncludeHeaderFunc(Uri header)?, List<String> ? compilerOpts, Map<String, List< varArgFunctions = const <String, List<VarArgFunction>>{}, DeclarationFilters? functionDecl, DeclarationFilters? structDecl, DeclarationFilters? unionDecl, DeclarationFilters? enumClassDecl, DeclarationFilters? unnamedEnumConstants, DeclarationFilters? globals, DeclarationFilters? macroDecl, DeclarationFilters? typedefs, DeclarationFilters? objcInterfaces, DeclarationFilters? objcProtocols, DeclarationFilters? objcCategories, bool includeUnusedTypedefs = false, bool includeTransitiveObjCInterfaces = false, bool includeTransitiveObjCProtocols = false, bool includeTransitiveObjCCategories = true, bool generateForPackageObjectiveC = false, bool sort = false, bool useSupportedTypedefs = true, List<VarArgFunction> >LibraryImport> libraryImports = const <LibraryImport>[], Map<String, ImportedType> usrTypeMappings = const <String, ImportedType>{}, List<ImportedType> typedefTypeMappings = const <ImportedType>[], List<ImportedType> structTypeMappings = const <ImportedType>[], List<ImportedType> unionTypeMappings = const <ImportedType>[], List<ImportedType> nativeTypeMappings = const <ImportedType>[], CommentType? commentType, CompoundDependencies structDependencies = CompoundDependencies.full, CompoundDependencies unionDependencies = CompoundDependencies.full, PackingValue? structPackingOverrideFunc(Declaration declaration)?, String? interfaceModuleFunc(Declaration declaration)?, String? protocolModuleFunc(Declaration declaration)?, String wrapperName = 'NativeLibrary', String? wrapperDocComment, String? preamble, bool useDartHandle = true, bool silenceEnumWarning = false, bool shouldExposeFunctionTypedefFunc(Declaration declaration)?, bool isLeafFunctionFunc(Declaration declaration)?, bool enumShouldBeIntFunc(Declaration declaration)?, bool unnamedEnumsShouldBeIntFunc(Declaration declaration)?, FfiNativeConfig ffiNativeConfig = const FfiNativeConfig(enabled: false), bool ignoreSourceErrors = false, bool formatOutput = true, ExternalVersions externalVersions = const ExternalVersions()}) -
factory
Properties
- commentType → CommentType
-
Extracted Doc comment type.
no setter
-
compilerOpts
→ List<
String> -
CommandLine Arguments to pass to clang_compiler.
no setter
-
entryPoints
→ List<
Uri> -
Path to headers. May not contain globs.
no setter
- enumClassDecl → DeclarationFilters
-
Declaration filters for Enums.
no setter
- externalVersions → ExternalVersions
-
Minimum target versions for ObjC APIs, per OS. APIs that were deprecated
before this version will not be generated.
no setter
- ffiNativeConfig → FfiNativeConfig
-
Config options for @Native annotations.
no setter
- filename → Uri?
-
Input config filename, if any.
no setter
- formatOutput → bool
-
Whether to format the output file.
no setter
- functionDecl → DeclarationFilters
-
Declaration filters for Functions.
no setter
- generateForPackageObjectiveC → bool
-
Undocumented option that changes code generation for package:objective_c.
The main difference is whether NSObject etc are imported from
package:objective_c (the default) or code genned like any other class.
This is necessary because package:objective_c can't import NSObject from
itself.
no setter
- globals → DeclarationFilters
-
Declaration filters for Globals.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- ignoreSourceErrors → bool
-
Where to ignore compiler warnings/errors in source header files.
no setter
- includeTransitiveObjCCategories → bool
-
If enabled, Objective C categories that are not explicitly included by
the DeclarationFilters, but extend interfaces that are included,
will be code-genned as if they were included. If disabled, these
transitively included categories will not be generated at all.
no setter
- includeTransitiveObjCInterfaces → bool
-
If enabled, Objective C interfaces that are not explicitly included by
the DeclarationFilters, but are transitively included by other bindings,
will be code-genned as if they were included. If disabled, these
transitively included interfaces will be generated as stubs instead.
no setter
- includeTransitiveObjCProtocols → bool
-
If enabled, Objective C protocols that are not explicitly included by
the DeclarationFilters, but are transitively included by other bindings,
will be code-genned as if they were included. If disabled, these
transitively included protocols will not be generated at all.
no setter
- includeUnusedTypedefs → bool
-
If enabled, unused typedefs will also be generated.
no setter
- language → Language
-
Language that ffigen is consuming.
no setter
- libclangDylib → Uri
-
Path to the clang library.
no setter
-
libraryImports
→ Map<
String, LibraryImport> -
Stores all the library imports specified by user including those for ffi
and pkg_ffi.
no setter
- macroDecl → DeclarationFilters
-
Declaration filters for Macro constants.
no setter
-
nativeTypeMappings
→ Map<
String, ImportedType> -
Stores native int name to ImportedType mappings specified by user.
no setter
- objcCategories → DeclarationFilters
-
Declaration filters for Objective C categories.
no setter
- objcInterfaces → DeclarationFilters
-
Declaration filters for Objective C interfaces.
no setter
- objcProtocols → DeclarationFilters
-
Declaration filters for Objective C protocols.
no setter
- output → Uri
-
Output file name.
no setter
- outputObjC → Uri
-
Output ObjC file name.
no setter
- packageConfig → PackageConfig?
-
Package config.
no setter
- preamble → String?
-
Header of the generated bindings.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- silenceEnumWarning → bool
-
Whether to silence warning for enum integer type mimicking.
no setter
- sort → bool
-
If generated bindings should be sorted alphabetically.
no setter
- structDecl → DeclarationFilters
-
Declaration filters for Structs.
no setter
- structDependencies → CompoundDependencies
-
Whether structs that are dependencies should be included.
no setter
-
structTypeMappings
→ Map<
String, ImportedType> -
Stores struct name to ImportedType mappings specified by user.
no setter
- symbolFile → SymbolFile?
-
Symbol file config.
no setter
- typedefs → DeclarationFilters
-
Declaration filters for Typedefs.
no setter
-
typedefTypeMappings
→ Map<
String, ImportedType> -
Stores typedef name to ImportedType mappings specified by user.
no setter
- unionDecl → DeclarationFilters
-
Declaration filters for Unions.
no setter
- unionDependencies → CompoundDependencies
-
Whether unions that are dependencies should be included.
no setter
-
unionTypeMappings
→ Map<
String, ImportedType> -
Stores union name to ImportedType mappings specified by user.
no setter
- unnamedEnumConstants → DeclarationFilters
-
Declaration filters for Unnamed enum constants.
no setter
- useDartHandle → bool
-
If
Dart_Handle
should be mapped with Handle/Object.no setter - useSupportedTypedefs → bool
-
If typedef of supported types(int8_t) should be directly used.
no setter
-
usrTypeMappings
→ Map<
String, ImportedType> -
Stores all the symbol file maps name to ImportedType mappings specified by
user.
no setter
-
varArgFunctions
→ Map<
String, List< VarArgFunction> > -
VarArg function handling.
no setter
- wrapperDocComment → String?
-
Doc comment for the wrapper class.
no setter
- wrapperName → String
-
Name of the wrapper class.
no setter
Methods
-
enumShouldBeInt(
Declaration declaration) → bool - Whether to generate the given enum as a series of int constants, rather than a real Dart enum.
-
interfaceModule(
Declaration declaration) → String? - The module that the ObjC interface belongs to.
-
isLeafFunction(
Declaration declaration) → bool - Whether the given function is a leaf function.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
protocolModule(
Declaration declaration) → String? - The module that the ObjC protocol belongs to.
-
shouldExposeFunctionTypedef(
Declaration declaration) → bool - Whether to expose the function typedef for a given function.
-
shouldIncludeHeader(
Uri header) → bool - Whether to include a specific header. This exists in addition to entryPoints to allow filtering of transitively included headers.
-
structPackingOverride(
Declaration declaration) → PackingValue? - Whether, and how, to override struct packing for the given struct.
-
toString(
) → String -
A string representation of this object.
inherited
-
unnamedEnumsShouldBeInt(
Declaration declaration) → bool - Whether to generate the given unnamed enum as a series of int constants, rather than a real Dart enum.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited