<?xml version="1.0" encoding="utf-8"?>
<config id="FunctionsMapping" xmlns="urn:SharpGen.Config">
    <assembly>Functions</assembly>
    <namespace>Functions</namespace>

    <sdk name="StdLib" />

    <include-dir>$(THIS_CONFIG_PATH)\..\Native\Functions</include-dir>
    <include file="Functions.h" attach="true" />

    <bindings>
        <bind from="PointerSize" to="SharpGen.Runtime.PointerSize" />
    </bindings>

    <extension>
        <create class="Functions.NativeFunctions" />
        <const from-macro="TestConstant" class="Functions.NativeFunctions" type="int" name="TestConstant">$1</const>
    </extension>

    <mapping>
        <map enum="MyEnum" flags="true" />
        <map param="(.*)::out(.*)" attribute="out" />
        <map param="StructArrayMarshalling::in(.*)" attribute="in buffer" />
        <map param="StructArrayMarshalling::out(.*)" attribute="out buffer" />
        <map param="SetAllElements::ref" attribute="inout" />
        <map param="FirstElementOrZero::ref" attribute="in optional" />
        <map param="(.*)::results" attribute="out buffer" />
        <map param="(.*)Optional::results" attribute="out buffer optional" />
        <map param="BoolArrayTest::in" attribute="in buffer" />
        <map param="BoolArrayTest::out" attribute="out buffer" />
        <map param="BoolToIntTest::.*" type="bool" />
        <map param="BoolToIntTest::out" return="true" />
        <map param="FastOutTest::out" attribute="out fast" />
        <map function=".*" group="Functions.NativeFunctions" dll='"FunctionsNative.dll"' />
        <map struct="StructWithStaticMarshal" static-marshal="true" />
        <map param="Increment::cell" attribute="inout" />
        <map param="Add::rhs_opt" attribute="in optional" />
        <map param="Sum::elements" attribute="in buffer optional" />
        <map param="Product::elements" attribute="in buffer params" />
        <map function="Product" type="longlong" />
        <map param="SumValues::val" attribute="in value" />
        <map param="StructArrayOut::out" attribute="out buffer optional" />
        <map struct="StructAsClass" struct-to-class="true" />
        <map param="SumInner::test" attribute="in buffer" />
        <map param="AddOne::param" attribute="inout optional" />
        <map param="EnumOut::test" attribute="out" />
        <map param="FirstEnumElement::test" attribute="in buffer" />
        <map param="ArrayRelation(.*)::length" relation="length(array)"/>
        <map param="ArrayRelation(.*)::array" attribute="in buffer" />
        <map param="ArrayRelationOut(.*)::array" attribute="out buffer" />
        <map function="ArrayRelation(.*)" name="$1" />
        <map function="ArrayRelationOut(.*)" name="$1" />
        <map param="ArrayRelationInInterfaceArray::length" type="longlong" />
        <map param="VerifyReservedParam::reserved" relation="const(42)" />
        <map param="PreserveVoidPointer.*_False::array" keep-pointers="false" />
        <map param="PreserveVoidPointer.*_True::array" keep-pointers="true" />
    </mapping>
</config>