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

Modules/BallLocator/BallLocatorSelector.h

Go to the documentation of this file.
00001 /**
00002 * @file BallLocatorSelector.h
00003 * 
00004 * Definition of class BallLocatorSelector
00005 *
00006 * @author Max Risler
00007 * @author Martin Lötzsch
00008 * @author Matthias Jüngel
00009 */
00010 
00011 #ifndef __BallLocatorSelector_h_
00012 #define __BallLocatorSelector_h_
00013 
00014 #include "Tools/Module/ModuleSelector.h"
00015 #include "BallLocator.h"
00016 #include "GT2005BallLocator.h"
00017 #include "GTCamBallLocator.h"
00018 
00019 /**
00020 * @class BallLocatorSelector
00021 * 
00022 * A module selector for ball locators.
00023 *
00024 * @author Martin Lötzsch
00025 */
00026 class BallLocatorSelector : public ModuleSelector, public BallLocatorInterfaces
00027 {
00028 public:
00029 /**
00030 * Constructor.
00031 * @param handler The module handler of the process.
00032 * @param interfaces The paramters of the BallLocator module.
00033   */
00034   BallLocatorSelector(ModuleHandler &handler, const BallLocatorInterfaces& interfaces)
00035     : ModuleSelector(SolutionRequest::ballLocator),
00036     BallLocatorInterfaces(interfaces)
00037   {
00038     handler.setModuleSelector(SolutionRequest::ballLocator, 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::gt2005BallLocator:
00052       return new GT2005BallLocator(*this);
00053 
00054     case SolutionRequest::gtCamBallLocator:
00055       return new GTCamBallLocator(*this);
00056     default:
00057       return 0;
00058     }
00059   }
00060   
00061 };
00062 
00063 #endif //__BallLocatorSelector_h_

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