/* -----------------------------------------------------------------------------
	GSFramework
	Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */


#ifndef	__NIIMPORT__
#define	__NIIMPORT__


		#include "core/resource_factory_event_interface.h"
		#include "nstring/nstring.h"


namespace GS {

	namespace S3D {
	class Scene;
	class Group;

//
struct	IImport
{
struct	Config
{
enum	PathExistsPolicy
{
	Skip		=	0,
	Overwrite,
	Rename
};

	sIResourceFactoryEvent event_handler;

	String			base_path;

	float			scale;
	int				frame_per_second;

	bool			import_animation;

	PathExistsPolicy exists_policy_geometry,
					 exists_policy_material,
					 exists_policy_texture;

	Config() : scale(1.f), frame_per_second(24), import_animation(true), exists_policy_geometry(Skip), exists_policy_material(Skip), exists_policy_texture(Skip) {}
};

		/// Helper function to determine an imported resource path.
		bool		GetOutputPath(String &out, const String &base, const char *name, const char *dflt, const char *ext, Config::PathExistsPolicy = Config::Skip) const;

		/// Test importer on a file.
virtual	bool		TestImport(const char *uri) = 0;
		/// Import scene from file.
virtual	bool		ImportScene(Scene *, const char *uri, const Config &, Group ** = 0) = 0;

virtual	~IImport() {}
};

	} // S3D
} // GS


#endif	// __NIIMPORT__
