Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Modules/ObstaclesLocator/ObstaclesLocatorSelector.h

Go to the documentation of this file.
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 "GT2005ObstaclesLocator.h"
00014 #include "GTCamObstaclesLocator.h"
00015 
00016 /**
00017 */
00018 class ObstaclesLocatorSelector : public ModuleSelector, public ObstaclesLocatorInterfaces
00019 {
00020 public:
00021 /**
00022 * Constructor.
00023 * @param handler The module handler of the process.
00024 * @param interfaces The paramters of the PlayersLocator module.
00025   */
00026   ObstaclesLocatorSelector(ModuleHandler &handler,const ObstaclesLocatorInterfaces& interfaces)
00027     : ModuleSelector(SolutionRequest::obstaclesLocator),
00028     ObstaclesLocatorInterfaces(interfaces)
00029   {
00030     handler.setModuleSelector(SolutionRequest::obstaclesLocator, this);
00031   }
00032   
00033   /** 
00034   * Is called on start and when the selected solution changes
00035   * to create a specific solution.
00036   * @param id The id of the solution to create
00037   * @return The created solution or 0
00038   */
00039   virtual Module* createSolution(SolutionRequest::ModuleSolutionID id)
00040   {
00041     switch(id)
00042     {
00043     case SolutionRequest::gt2005ObstaclesLocator:
00044       return new GT2005ObstaclesLocator(*this);
00045     case SolutionRequest::gtCamObstaclesLocator:
00046       return new GTCamObstaclesLocator(*this);
00047     default:
00048       return 0;
00049     }
00050   }
00051 };
00052 
00053 #endif //__ObstaclesLocatorSelector_h_
00054 

Generated on Mon Mar 20 21:59:54 2006 for GT2005 by doxygen 1.3.6