#ifndef INCLUDED_SCENEREADER
#define INCLUDED_SCENEREADER

#include <Math/Vector.h>

#include <memory>
#include <list>

namespace Dubious {
namespace Utility {
class FilePath;
class NativeManager;
typedef std::shared_ptr<NativeManager> NativeManagerPtr;
}
namespace Renderer {
class Color;
}
}

class AAssetManager;
class ModelStore;
class SceneDescriptionType;
class GroupReferenceType;
class Object;
typedef std::shared_ptr<ModelStore> ModelStorePtr;
typedef std::shared_ptr<Object> ObjectPtr;
typedef std::list<ObjectPtr> ObjectPtrList;

using namespace Dubious;

//////////////////////////////////////////////////////////////
class SceneReader
{
public:
	SceneReader( ModelStorePtr pModelStore );
	~SceneReader();

	void				ReadScene( AAssetManager& Manager, const Utility::FilePath& SceneFile,
								   ObjectPtr& pFloor, ObjectPtrList& Objects );

private:
	SceneReader( const SceneReader& );
	SceneReader& operator=( const SceneReader& );

	void 				ReadBlocks( ObjectPtrList& Objects, const SceneDescriptionType& Scene,
								    const GroupReferenceType& GroupReference, const Math::Vector& Offset,
								    const Renderer::Color& BaseColor );

	ModelStorePtr		m_pModelStore;
};

#endif
