import tango.io.Stdout;
import struct_wrapper;

struct StructA
{
	int x = 0;
	int y = 0;
	double z = 0;
}

struct StructB
{
	int x = 0;
	
	void Negate()
	{
		x = -x;
	}
}

mixin(WrapStruct!("StructA")); //Creates a class called StructAManager
mixin(WrapStruct!("StructB")); //Creates a class called StructBManager

void main()
{
	StructA a;
	StructB b;
	
	auto a_manager = new StructAManager();
	auto b_manager = new StructBManager();
	
	a_manager.IncrementDoubles(a);
	a_manager.IncrementIntegers(a);
	a_manager.Negate(a);
	
	Stdout.formatln("{} {} {}", a.x, a.y, a.z); // 1 1 1.00
	
	b_manager.IncrementDoubles(b);
	b_manager.IncrementIntegers(b);
	b_manager.Negate(b);
	
	Stdout.formatln("{}", b.x); // -1
}
