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


#ifndef	__NPROJECTSCENEINSTANCE__
#define	__NPROJECTSCENEINSTANCE__


		#include "nstring/nstring.h"


namespace GS {
	namespace S2D { class Scene; }
	namespace S3D { class Scene; }
	namespace Core {

// Project scene instance.
class	ProjectSceneInstance
{
		friend class Project;

public:

enum	Type
{
	Type_Scene3d	=	0,
	Type_Scene2d
};

protected:

		bool			active;
		Type			type;

public:

		union
		{
			void		*instance;
			S2D::Scene	*instance_2d;
			S3D::Scene	*instance_3d;
		};

		String			GetPath() const;

		Type			GetType() const { return type; }
		bool			IsActive() const { return active; }

		void			Free();

		~ProjectSceneInstance();

protected:

		ProjectSceneInstance(S3D::Scene *inst)
		{
			active = true;
			type = Type_Scene3d;
			instance_3d = inst;
		}
		ProjectSceneInstance(S2D::Scene *inst)
		{
			active = true;
			type = Type_Scene2d;
			instance_2d = inst;
		}
};

	} // Core
} // GS


#endif	// __NPROJECTSCENEINSTANCE__
