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

Modules/LEDControl/LEDControlSelector.h

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

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