#ifndef SENSOR_MANAGER_DEF_H
#define SENSOR_MANAGER_DEF_H

#include "sensor.h"

namespace algorithm{
	namespace base{
		
		enum SensorType{
			Sensor_Accelerometer = 0,
			Sensor_MagneticSensor = 1,
			Sensor_Gyroscope = 2	
		};

		class SensorManager{
		public:
			SensorManager(){
			};
			~SensorManager(){};
		public:
			Sensor<double>* get_sensor(const SensorType& st){
				Sensor<double>* pSensor = nullptr;
				switch (st)
				{
				case SensorType::Sensor_Accelerometer:
					pSensor = new Accelerometer<double>();
					break;
				case Sensor_Gyroscope:
					pSensor = new Gyroscope<double>();
					break;
				case Sensor_MagneticSensor:
					pSensor = new MagneticSensor<double>();
					break;
				}

				return pSensor;
			};

		};
	};
}

#endif