//	BulletCreator.h - Factory class used to create Bullets with the correct
//					  set of modifiers.
//  ----------------------------------------------------------------------------
//	This file is part of 'NiallsAVLib', base code for any kind of audiovisual
//	apps.
//	Copyright (C) 2012  Niall Moody
//	
//	This program is free software: you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation, either version 3 of the License, or
//	(at your option) any later version.
//
//	This program is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU General Public License
//	along with this program.  If not, see <http://www.gnu.org/licenses/>.
//	----------------------------------------------------------------------------

#ifndef BULLETCREATOR_H_
#define BULLETCREATOR_H_

#include "ThreeFloats.h"
#include "c0xHeaders.h"
#include "TwoFloats.h"

#include <vector>
#include <string>

class BulletCollisionCreatorBase;
class BulletDirectionCreatorBase;
class BulletDeathCreatorBase;
class GamePlayState;
class Bullet;

///	Factory class used to create Bullets with the correct set of modifiers.
class BulletCreator
{
  public:
	///	Constructor.
	BulletCreator();
	///	Destructor.
	~BulletCreator();

	///	Returns a newly-created Bullet with the correct modifiers.
	shared_ptr<Bullet> getBullet(const TwoFloats& pos,
								 const TwoFloats& dir,
								 const ThreeFloats& col,
								 const std::wstring& parent);
	///	Returns a newly-created Bullet with no modifiers.
	shared_ptr<Bullet> getPlainBullet(const TwoFloats& pos,
									  const TwoFloats& dir,
									  const ThreeFloats& col,
									  const std::wstring& parent);

	///	Adds a collision modifier to the list.
	void addCollisionModifier(BulletCollisionCreatorBase * mod);
	///	Adds a death modifier to the list.
	void addDeathModifier(BulletDeathCreatorBase * mod);
	///	Adds a direction modifier to the list.
	void addDirectionModifier(BulletDirectionCreatorBase * mod);
  private:
	///	The active collision modifiers.
	std::vector<BulletCollisionCreatorBase *> collisionMods;
	///	The active death modifiers.
	std::vector<BulletDeathCreatorBase *> deathMods;
	///	The active direction modifiers.
	std::vector<BulletDirectionCreatorBase *> directionMods;
};

#endif
