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

Modules/SelfLocator/SelfLocatorSelector.h

Go to the documentation of this file.
00001 /**
00002 * @file SelfLocatorSelector.h
00003 * 
00004 * Definition of class SelfLocatorSelector
00005 *
00006 * @author Max Risler
00007 * @author Martin Lötzsch
00008 * @author Matthias Jüngel
00009 */
00010 
00011 #ifndef __SelfLocatorSelector_h_
00012 #define __SelfLocatorSelector_h_
00013 
00014 #include "Tools/Module/ModuleSelector.h"
00015 
00016 #include "GT2005SelfLocator/GT2005SelfLocator.h"
00017 #include "GT2005StableSelfLocator/GT2005StableSelfLocator.h"
00018 #include "GT2004SelfLocator.h"
00019 #include "SlamSelfLocator/SlamSelfLocator.h"
00020 #include "GTCamSelfLocator.h"
00021 #include "OdometrySelfLocator.h"
00022 #include "ComboLocator.h"
00023 
00024 /**
00025 * SelfLocator selection module.
00026 *
00027 * A selector for self locators
00028 */
00029 class SelfLocatorSelector : public ModuleSelector, public SelfLocatorInterfaces
00030 {
00031 public:
00032 /**
00033 * Constructor.
00034 * @param handler The module handler of the process.
00035 * @param interfaces The paramters of the SelfLocator module.
00036   */
00037   SelfLocatorSelector(ModuleHandler &handler, const SelfLocatorInterfaces& interfaces)
00038     : ModuleSelector(SolutionRequest::selfLocator),
00039     SelfLocatorInterfaces(interfaces)
00040   {
00041     handler.setModuleSelector(SolutionRequest::selfLocator, this);
00042   }
00043   
00044   /** 
00045   * Is called on start and when the selected solution changes
00046   * to create a specific solution.
00047   * @param id The id of the solution to create
00048   * @return The created solution or 0
00049   */
00050   virtual Module* createSolution(SolutionRequest::ModuleSolutionID id)
00051   {
00052     switch(id)
00053     {
00054     case SolutionRequest::gt2005SelfLocator:
00055       return new GT2005SelfLocator(*this);
00056 
00057     case SolutionRequest::gt2005StableSelfLocator:
00058       return new GT2005StableSelfLocator(*this);
00059       
00060     case SolutionRequest::gt2004SelfLocator:
00061       return new GT2004SelfLocator(*this);
00062 
00063     case SolutionRequest::odometrySelfLocator:
00064       return new OdometrySelfLocator(*this);
00065 
00066     case SolutionRequest::gtCamSelfLocator:
00067       return new GTCamSelfLocator(*this);
00068 
00069     case SolutionRequest::slamSelfLocator:
00070       return new SlamSelfLocator(*this); // replace later
00071 
00072     case SolutionRequest::comboSelfLocator:
00073       return new ComboLocator(*this); // replace later
00074 
00075 
00076     default:
00077       return 0;
00078     }
00079   }
00080 
00081 };
00082 
00083 #endif // __SelfLocatorSelector_h_

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