00001 /** 00002 * @file ObstaclesLocatorSelector.h 00003 * 00004 * Definition of class ObstaclesLocatorSelector 00005 * 00006 * @author <a href="mailto:juengel@informatik.hu-berlin.de">Matthias Juengel</a> 00007 */ 00008 00009 #ifndef __ObstaclesLocatorSelector_h_ 00010 #define __ObstaclesLocatorSelector_h_ 00011 00012 #include "Tools/Module/ModuleSelector.h" 00013 #include "GT2004ObstaclesLocator.h" 00014 00015 /** 00016 */ 00017 class ObstaclesLocatorSelector : public ModuleSelector, public ObstaclesLocatorInterfaces 00018 { 00019 public: 00020 /** 00021 * Constructor. 00022 * @param handler The module handler of the process. 00023 * @param interfaces The paramters of the PlayersLocator module. 00024 */ 00025 ObstaclesLocatorSelector(ModuleHandler &handler,const ObstaclesLocatorInterfaces& interfaces) 00026 : ModuleSelector(SolutionRequest::obstaclesLocator), 00027 ObstaclesLocatorInterfaces(interfaces) 00028 { 00029 handler.setModuleSelector(SolutionRequest::obstaclesLocator, this); 00030 } 00031 00032 /** 00033 * Is called on start and when the selected solution changes 00034 * to create a specific solution. 00035 * @param id The id of the solution to create 00036 * @return The created solution or 0 00037 */ 00038 virtual Module* createSolution(SolutionRequest::ModuleSolutionID id) 00039 { 00040 switch(id) 00041 { 00042 case SolutionRequest::gt2004ObstaclesLocator: 00043 return new GT2004ObstaclesLocator(*this); 00044 default: 00045 return 0; 00046 } 00047 } 00048 }; 00049 00050 #endif //__ObstaclesLocatorSelector_h_ 00051 00052 /* 00053 * Change log: 00054 * 00055 * $Log: ObstaclesLocatorSelector.h,v $ 00056 * Revision 1.2 2004/07/10 00:13:52 spranger 00057 * renaming for coderelease and preparations for gt2005 00058 * 00059 * Revision 1.1.1.1 2004/05/22 17:20:38 cvsadm 00060 * created new repository GT2004_WM 00061 * 00062 * Revision 1.3 2004/03/08 01:39:04 roefer 00063 * Interfaces should be const 00064 * 00065 * Revision 1.2 2004/01/21 14:31:58 loetzsch 00066 * Module Selectors create only the selected solution. 00067 * When the solution changes, the old solution is erased and the new 00068 * one ist created using createSolution(..) 00069 * 00070 * Revision 1.1 2003/10/06 14:10:14 cvsadm 00071 * Created GT2004 (M.J.) 00072 * 00073 * Revision 1.1.1.1 2003/07/02 09:40:24 cvsadm 00074 * created new repository for the competitions in Padova from the 00075 * tamara CVS (Tuesday 2:00 pm) 00076 * 00077 * removed unused solutions 00078 * 00079 * Revision 1.3 2003/05/14 13:08:38 risler 00080 * removed DefaultObstaclesLocator 00081 * renamed MicroSectorsObstaclesLocator to DefaultObstaclesLocator 00082 * ObstaclesModel contains increased number of sectors 00083 * DefaultObstaclesLocator clean up 00084 * 00085 * Revision 1.2 2003/04/04 09:35:09 jhoffman 00086 * added obstacle locator 00087 * 00088 * Revision 1.1 2003/03/10 13:53:59 juengel 00089 * ObstaclesLocator 00090 * 00091 * 00092 */ 00093