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

# Modules/RobotStateDetector/RobotStateDetectorSelector.h

Go to the documentation of this file.

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