#ifndef SIMULATIONOBJECT_H_
#define SIMULATIONOBJECT_H_

#include <string>

#include "../config.h"
#include <ode/ode.h>

/** Class representing the very initial parent of all objects in simulation.
 * It governs assigning of unique identifiers for all created objects.
 * It also holds the reference to the ODE simulation world and collision space.
 */
class SimulationObject {
public:
	SimulationObject();
	virtual ~SimulationObject();
	
	static void setWorldID(dWorldID id);
	static void setSpaceID(dSpaceID id);
	
	int getID() const { return _id; };
	dWorldID getWorldID() const { return SimulationObject::_worldID; };
	dSpaceID getSpaceID() const { return SimulationObject::_spaceID; };
	virtual std::string toString() const = 0;

private:
	/** ID unique for each simulation object */
	int _id;
	/** The ODE simulation world reference */
	static dWorldID _worldID;
	/** The ODE simulation colision space reference */
	static dSpaceID _spaceID;
	/** Value of the next ID to be assigned */
	static int _nextID;
};

#endif /*SIMULATIONOBJECT_H_*/
