Optional: A list of identifiers to be aliases of the function.
Optional: Function attributes. pure will be removed from dynamic bindings.
Specifies which extern linkage to use. | Support status | Input | Generated code | |-------------------|-----------------|-------------------------| | Fully supported | C | extern(C) | | Mostly supported | C++ | extern(C++) | | Mostly supported | C++. "name" | extern(C++, "name") | | Mostly supported | C++. "a", "b" | extern(C++, "a", "b") | | Not yet supported | Objective-C | extern(Objective-C) |
The identifier of the function in the library you are binding. Use this when binding a constructor, ~this when binding a destructor. Must be non-null.
Whether or not a member function is static. Should not be true for non-member functions.
Optional: Member function attributes.
Comma-separated named function parameters. Constructors can have no parameters. Constructors with all-default parameters will not currently work!
Optional: Anything to be placed immediately before the public version of the function, like deprecated, etc.
Optional: If populated, iden will be private, and a public alias with the name pubIden will be created.
Return type. Passing const char* instead of 'const(char)* to a member function will erroneously cause the function to be const. You should use attrib for this instead. Must be void for constructors and destructors. Must be non-null, except where it is ignored.
FnBbind one = {q{void}, q{someCppFn}, q{int si, uint ui}, ext: `C++`}; //OK
FnBbind two = {q{void}, q{someCppFn}, q{uint ui, int si}, `C++`}; //`ext` was not specified by identifier; might break in the future!Never place whitespace around strings provided to FnBind, as it may cause incorrect binding generation.
Data for function bindings.
Only the locations of the first 3 fields (retn, iden, and params) should be relied on. Every other field should always be written/read by using its identifier.