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