

class BMXISceneUserDataSerializer : public ISceneUserDataSerializer
{
public:

	BMXBinder binder;

	void (*BMXISceneUserDataSerializer_OnReadUserData)(s32 binding,ISceneNode* forSceneNode,io::IAttributes* userData);
	io::IAttributes* (*BMXISceneUserDataSerializer_createUserData)(s32 binding,ISceneNode* forSceneNode);
	void (*BMXISceneUserDataSerializer_OnCreateNode)(s32 binding, ISceneNode* node);

	BMXBinder* getBinder()
	{
		return &binder;
	}

	BMXISceneUserDataSerializer() : ISceneUserDataSerializer()
	{
		BMXISceneUserDataSerializer_OnReadUserData=0;
		BMXISceneUserDataSerializer_createUserData=0;
	}

	void OnCreateNode(ISceneNode* node)
	{
		if (BMXISceneUserDataSerializer_OnCreateNode)
			BMXISceneUserDataSerializer_OnCreateNode(binder.binding, node);
	}
	
	void OnReadUserData(ISceneNode* forSceneNode, io::IAttributes* userData)
	{
		if (BMXISceneUserDataSerializer_OnReadUserData)
			BMXISceneUserDataSerializer_OnReadUserData(binder.binding,forSceneNode,userData);
	}

	io::IAttributes* createUserData(ISceneNode* forSceneNode)
	{
		if (BMXISceneUserDataSerializer_createUserData)
			return BMXISceneUserDataSerializer_createUserData(binder.binding,forSceneNode);
		else return 0;
	}
};

extern "C"
{
	BMXBinder* IrrScene_BMXISceneUserDataSerializer_getBinder(BMXISceneUserDataSerializer* ds)
	{
		if (ds)
			return ds->getBinder();
		else return 0;
	}
	
	BMXISceneUserDataSerializer* IrrScene_BMXISceneUserDataSerializer_new()
	{
		return new BMXISceneUserDataSerializer();
	}

	void IrrScene_BMXISceneUserDataSerializer_bindOnCreateNode(BMXISceneUserDataSerializer* ds,void (*bind_OnCreateNode)(s32 binding,ISceneNode* node))
	{
		if (ds)
			ds->BMXISceneUserDataSerializer_OnCreateNode = bind_OnCreateNode;
	}

	void IrrScene_BMXISceneUserDataSerializer_bindOnReadUserData(BMXISceneUserDataSerializer* ds,void (*bind_OnReadUserData)(s32 binding,ISceneNode* forSceneNode,io::IAttributes* userData))
	{
		if (ds)
			ds->BMXISceneUserDataSerializer_OnReadUserData=bind_OnReadUserData;
	}

	void IrrScene_BMXISceneUserDataSerializer_bindCreateUserData(BMXISceneUserDataSerializer* ds,io::IAttributes* (*bind_createUserData)(s32 binding,ISceneNode* forSceneNode))
	{
		if (ds)
			ds->BMXISceneUserDataSerializer_createUserData=bind_createUserData;
	}
}



