/*
QtWagon: a project about 3D objects.
Science and technology promotion license applied. Third party license automatically cascaded.
Zhikai Wang/ www.heteroclinic.net 2013
You can do anything with this file or any file(s) published as part QtWagon project, given this header is kept.
*/
#ifndef _SINGLETON_QTMOVINGOBJECT
#define _SINGLETON_QTMOVINGOBJECT
#include "glwidget.h"
#include "glMovingObject.h"
#include "qtMovingObject.h"
class GLWidget;
class qtMovingObject;
class qtmovingobjectSingleton{
protected:
	glMovingObjectf * gmvopt;
	static qtmovingobjectSingleton * instance;
	qtmovingobjectSingleton() ;
	// WARNING: You can't define the constructor here, otherwise, it won't compile.
	//qtmovingobjectSingleton() {
	//	member = new qtMovingObject();
	//	gmvopt = new glMovingObjectf();
	//	member->setMovingObjPt(gmvopt);
	//	drawablesSingleton::getInstance()->add(gmvopt);
	//};
	//std::deque<glMovingObjectf *> dqofdrawables;
	qtMovingObject * member;
		qtMovingObject * getSingleMember() {
		return  member;
	};
	
public:




	static qtMovingObject * getInstance () {
		if (NULL== instance) {
			instance = new qtmovingobjectSingleton();
		}
		return instance->getSingleMember();
	}
	virtual ~qtmovingobjectSingleton() {
		//if (member != NULL) {

		//	delete member;
		//}
		//member = NULL;
	}

};
#endif