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

# Modules/ImageProcessor/ImageProcessorSelector.h

Go to the documentation of this file.

    00001 /**
    00002 * @file ImageProcessorSelector.h
    00003 *
    00004 * Definition of class ImageProcessorSelector
    00005 *
    00006 * @author Max Risler
    00007 * @author Martin Lötzsch
    00008 * @author Matthias Jüngel
    00009 */
    00010
    00011 #ifndef __ImageProcessorSelector_h_
    00012 #define __ImageProcessorSelector_h_
    00013
    00014 #include "Tools/Module/ModuleSelector.h"
    00015
    00016 #include "GT2005ImageProcessor/GT2005ImageProcessor.h"
    00017 #include "SlamImageProcessor/SlamImageProcessor.h"
    00018 #include "VLCImageProcessor/VLCImageProcessor.h"
    00019
    00020 /**
    00021 * ImageProcessor selection module.
    00022 *
    00023 * A selector for image processor modules.
    00024 */
    00025 class ImageProcessorSelector : public ModuleSelector, public ImageProcessorInterfaces
    00026 {
    00027 public:
    00028 /**
    00029 * Constructor.
    00030 * @param handler The module handler of the process.
    00031 * @param interfaces The parameters of the ImageProcessor module.
    00032   */
    00033
    00034   ImageProcessorSelector(
    00035     ModuleHandler &handler,
    00036     const ImageProcessorInterfaces& interfaces)
    00037     : ModuleSelector(SolutionRequest::imageProcessor),
    00038     ImageProcessorInterfaces(interfaces)
    00039   {
    00040     handler.setModuleSelector(SolutionRequest::imageProcessor, this);
    00041   }
    00042
    00043   /**
    00044   * Is called on start and when the selected solution changes
    00045   * to create a specific solution.
    00046   * @param id The id of the solution to create
    00047   * @return The created solution or 0
    00048   */
    00049   virtual Module* createSolution(SolutionRequest::ModuleSolutionID id)
    00050   {
    00051     switch(id)
    00052     {
    00053     case SolutionRequest::gt2005ImageProcessor:
    00054       return new GT2005ImageProcessor(*this);
    00055
    00056     case SolutionRequest::slamImageProcessor:
    00057       return new SlamImageProcessor(*this);
    00058
    00059     case SolutionRequest::vlcImageProcessor:
    00060       return new VLCImageProcessor(*this);
    00061
    00062     default:
    00063       return 0;
    00064     }
    00065   }
    00066 };
    00067
    00068 #endif // ImageProcessorSelector_h_