00001 /** 00002 * @file SensorDataProcessorSelector.h 00003 * 00004 * Declaration of class SensorDataProcessorSelector 00005 * 00006 * @author Martin Lötzsch 00007 */ 00008 00009 #ifndef __SensorDataProcessorSelector_h_ 00010 #define __SensorDataProcessorSelector_h_ 00011 00012 #include "Tools/Module/ModuleHandler.h" 00013 #include "GT2005SensorDataProcessor.h" 00014 00015 /** 00016 * @class SensorDataProcessorSelector 00017 * 00018 * A module selector for sensor data processors. 00019 * 00020 * @author Martin Lötzsch 00021 */ 00022 class SensorDataProcessorSelector : public ModuleSelector, public SensorDataProcessorInterfaces 00023 { 00024 public: 00025 /** 00026 * Constructor. 00027 * @param handler The module handler of the process. 00028 * @param interfaces The paramters of the HeadControl module. 00029 */ 00030 SensorDataProcessorSelector(ModuleHandler &handler, 00031 const SensorDataProcessorInterfaces& interfaces) 00032 : ModuleSelector(SolutionRequest::sensorDataProcessor), 00033 SensorDataProcessorInterfaces(interfaces) 00034 { 00035 handler.setModuleSelector(SolutionRequest::sensorDataProcessor,this); 00036 }; 00037 00038 00039 /** 00040 * Is called on start and when the selected solution changes 00041 * to create a specific solution. 00042 * @param id The id of the solution to create 00043 * @return The created solution or 0 00044 */ 00045 virtual Module* createSolution(SolutionRequest::ModuleSolutionID id) 00046 { 00047 switch(id) 00048 { 00049 case SolutionRequest::gt2005SensorDataProcessor: 00050 return new GT2005SensorDataProcessor(*this); 00051 00052 default: 00053 return 0; 00054 } 00055 } 00056 }; 00057 00058 #endif //__SensorDataProcessorSelector_h_
1.3.6