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