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