/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///																																  ///
///		FICHIER :	ZooData.h																								  ///
///																																  ///
///		NATURE	:	Data Class which manage the data structure of an object of the scene ( name, nb ref...) 					  ///
///																																  ///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




#ifndef __ZOODATA_H__
#define __ZOODATA_H__



#include	<stdlib.h>
#include	<stdio.h>

#include	<string>
using		std::string;





///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// ZNode Class
///
///		- Classe des Nodes - élément de base pour dérivation en 'ZObject', ou 'ZCamera', ou 'ZLight'..
///		- Méthode de gestion de hierarchie - Creation d'enfant de différents types
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

class ZData
{
public:

	string		name;
	int			type;

	int			nbRef;
	bool		referenced;			// flag indiquant s'il ya déjà eu UN référencement

	int			version;			// compteur pour comparer les dates de création (version)


	///////////////////////////////////////////////////////////////////////////
	/// Constucteur & Destructeur											///
	///////////////////////////////////////////////////////////////////////////
	ZData();
	virtual ~ZData()	{	/* nothing */	}


	///////////////////////////////////////////////////////////////////////////
	/// Decrement the number of references									///
	///////////////////////////////////////////////////////////////////////////
	void DecRef();


	///////////////////////////////////////////////////////////////////////////
	/// Increment the number of references									///
	///////////////////////////////////////////////////////////////////////////
	void IncRef();


	///////////////////////////////////////////////////////////////////////////
	/// Set the name of the node											///
	///////////////////////////////////////////////////////////////////////////
	void SetName(char * newName);
	void SetName(string newName);
};



#endif

