final class · System.Bindings

BindingSettings

public final class BindingSettings

The binding's settings: what is read, where it goes, and the rules every name follows unless a hook says otherwise. Configure fills them; what the command line names (libraries, headers, -I, -o) comes on top.

Kind
final class
Namespace
System.Bindings
Assembly
System.Bindings
Access
public, final
Source file
Model.ant

Inheritance

Base classes
Any BindingSettings

Fields

List<str> Libraries
#

The native libraries (paths from the profile's folder, or names in the system's folder: kernel32.dll). The first is the one the functions are imported from.

List<str> Headers
#

The C headers read (through clang when it is installed).

List<str> Includes
#

Folders the headers' #includes are found in; their #defines become constants.

str Namespace
#

The root namespace of the binding.

str Class
#

The static class of the functions and constants (by default: the library's name).

str Assembly
#

The assembly's name (by default: the class + Bindings).

str Output
#

The Larva library written (by default: the assembly's name, .dll, next to the profile).

str Source
#

The folder the source of the binding is written to ("": none, unless the command line says --source).

SplitBy Split
#

How the source is split into files.

ExportCheck Exports
#

Functions the library does not export.

i32 LongBits
#

The size of C's long in bits: 32 (Windows) or 64 (Linux, macOS).

bool AllHeaders
#

Every declaration read, or (false) only what the headers and include folders declare and the system types they use.

bool EnumsFromC
#

C enums become enums (else their values are constants).

bool AutoFlags
#

An enum whose values are distinct bits (three or more) is a bitflag enum.

bool NamespaceByHeader
#

Each header's declarations go to a sub-namespace named after it (SDL3.Video).

bool ClassByHeader
#

Each header's functions and constants go to a class named after it (Video).

List<str> HeaderStrip
#

Prefixes stripped from the stem of a header where it names a namespace, class or file (lib_ of lib_core.h; none: Strip).

List<str> Strip
#

Prefixes stripped from every C name (the longest that fits first), and from each kind's.

List<str> StripTypes
#
List<str> StripFunctions
#
List<str> StripConstants
#
NameCase TypeCase
#

The case of each kind of name.

NameCase FunctionCase
#
NameCase ConstantCase
#
NameCase FieldCase
#
NameCase ParameterCase
#
NameCase MemberCase
#
bool StripMemberPrefix
#

Enum members lose the prefix they share (SDL_INIT_VIDEO → Video in InitFlags).

Inherited members (5)

Source

BindingSettings as Antril, decompiled from its Larva HIR.

System.Bindings.BindingSettings.ant
// System.Bindings.BindingSettings — System.Bindings (decompiled from Larva HIR)

import System;

into namespace System.Bindings
{
	/// The binding's settings: what is read, where it goes, and the rules every name follows unless a hook says otherwise.
	/// `Configure` fills them; what the command line names (libraries, headers, -I, -o) comes on top.
	public final class BindingSettings
	{
		public:
			/// The native libraries (paths from the profile's folder, or names in the system's folder: `kernel32.dll`).
			/// The first is the one the functions are imported from.
			List<str> Libraries;

			/// The C headers read (through clang when it is installed).
			List<str> Headers;

			/// Folders the headers' `#include`s are found in; their `#define`s become constants.
			List<str> Includes;

			/// The root namespace of the binding.
			str Namespace;

			/// The static class of the functions and constants (by default: the library's name).
			str Class;

			/// The assembly's name (by default: the class + `Bindings`).
			str Assembly;

			/// The Larva library written (by default: the assembly's name, `.dll`, next to the profile).
			str Output;

			/// The folder the source of the binding is written to ("": none, unless the command line says `--source`).
			str Source;

			/// How the source is split into files.
			SplitBy Split;

			/// Functions the library does not export.
			ExportCheck Exports;

			/// The size of C's `long` in bits: 32 (Windows) or 64 (Linux, macOS).
			i32 LongBits;

			/// Every declaration read, or (false) only what the headers and include folders declare and the system types they use.
			bool AllHeaders;

			/// C enums become enums (else their values are constants).
			bool EnumsFromC;

			/// An enum whose values are distinct bits (three or more) is a bitflag enum.
			bool AutoFlags;

			/// Each header's declarations go to a sub-namespace named after it (`SDL3.Video`).
			bool NamespaceByHeader;

			/// Each header's functions and constants go to a class named after it (`Video`).
			bool ClassByHeader;

			/// Prefixes stripped from the stem of a header where it names a namespace, class or file (`lib_` of `lib_core.h`; none: `Strip`).
			List<str> HeaderStrip;

			/// Prefixes stripped from every C name (the longest that fits first), and from each kind's.
			List<str> Strip;
			List<str> StripTypes;
			List<str> StripFunctions;
			List<str> StripConstants;

			/// The case of each kind of name.
			NameCase TypeCase;
			NameCase FunctionCase;
			NameCase ConstantCase;
			NameCase FieldCase;
			NameCase ParameterCase;
			NameCase MemberCase;

			/// Enum members lose the prefix they share (`SDL_INIT_VIDEO` → `Video` in `InitFlags`).
			bool StripMemberPrefix;
	}
}
Esc