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

Modules/GetupEngine/GetupEngineSelector.h

Go to the documentation of this file.
00001 /**
00002 * @file GetupEngineSelector.h
00003 * 
00004 * Declares the GetupEngine selection module
00005 * @author Max Risler
00006 */
00007 
00008 #ifndef __GetupEngineSelector_h_
00009 #define __GetupEngineSelector_h_
00010 
00011 #include "Tools/Module/ModuleHandler.h"
00012 #include "GT2004GetupEngine.h"
00013 
00014 /**
00015 * @class GetupEngineSelector
00016 *
00017 * A module selector for GetupEngine modules.
00018 */
00019 class GetupEngineSelector : public ModuleSelector, public GetupEngineInterfaces
00020 {
00021 public:
00022 /**
00023 * Constructor.
00024 * @param handler The module handler of the process.
00025 * @param interfaces The paramters of the GetupEngine module.
00026   */
00027   GetupEngineSelector(ModuleHandler &handler, const GetupEngineInterfaces& interfaces) 
00028     : ModuleSelector(SolutionRequest::getupEngine),
00029     GetupEngineInterfaces(interfaces)
00030   {
00031     handler.setModuleSelector(SolutionRequest::getupEngine,this);
00032   }
00033   
00034   /** 
00035   * Is called on start and when the selected solution changes
00036   * to create a specific solution.
00037   * @param id The id of the solution to create
00038   * @return The created solution or 0
00039   */
00040   virtual Module* createSolution(SolutionRequest::ModuleSolutionID id)
00041   {
00042     switch (id)
00043     {
00044     case SolutionRequest::gt2004GetupEngine:
00045       return new GT2004GetupEngine(*this);
00046     default:
00047       return 0;
00048     }
00049   }
00050   
00051   /** Executes the module*/
00052   bool executeParameterized(JointData& jointData)
00053   {
00054     if (selectedSolution!=0)
00055       return ((GetupEngine*)selectedSolution)->executeParameterized(jointData);
00056     else
00057       return false;
00058   }
00059 };
00060 
00061 #endif // __GetupEngineSelector_h_
00062 
00063 /*
00064 * Change log :
00065 * 
00066 * $Log: GetupEngineSelector.h,v $
00067 * Revision 1.2  2004/07/10 00:13:51  spranger
00068 * renaming for coderelease and preparations for gt2005
00069 *
00070 * Revision 1.1.1.1  2004/05/22 17:19:10  cvsadm
00071 * created new repository GT2004_WM
00072 *
00073 * Revision 1.3  2004/03/08 01:38:52  roefer
00074 * Interfaces should be const
00075 *
00076 * Revision 1.2  2004/01/21 14:31:58  loetzsch
00077 * Module Selectors create only the selected solution.
00078 * When the solution changes, the old solution is erased and the new
00079 * one ist created using createSolution(..)
00080 *
00081 * Revision 1.1  2003/10/06 14:10:14  cvsadm
00082 * Created GT2004 (M.J.)
00083 *
00084 * Revision 1.1.1.1  2003/07/02 09:40:23  cvsadm
00085 * created new repository for the competitions in Padova from the 
00086 * tamara CVS (Tuesday 2:00 pm)
00087 *
00088 * removed unused solutions
00089 *
00090 * Revision 1.3  2003/03/06 12:06:50  dueffert
00091 * execute with parameters renamed to avoid inheritance warnings
00092 *
00093 * Revision 1.2  2002/09/11 00:06:58  loetzsch
00094 * continued change of module/solution mechanisms
00095 *
00096 * Revision 1.1  2002/09/10 15:36:14  cvsadm
00097 * Created new project GT2003 (M.L.)
00098 * - Cleaned up the /Src/DataTypes directory
00099 * - Removed challenge related source code
00100 * - Removed processing of incoming audio data
00101 * - Renamed AcousticMessage to SoundRequest
00102 *
00103 * Revision 1.1.1.1  2002/05/10 12:40:14  cvsadm
00104 * Moved GT2002 Project from ute to tamara.
00105 *
00106 * Revision 1.2  2002/02/23 16:33:07  risler
00107 * finished GetupEngine
00108 *
00109 * Revision 1.1  2002/02/20 16:40:50  risler
00110 * added GetupEngine
00111 *
00112 *
00113 */

Generated on Thu Sep 23 19:57:27 2004 for GT2004 by doxygen 1.3.6